Skip to content

Instantly share code, notes, and snippets.

View n-WN's full-sized avatar
🚼
DevSecOps

Zoee n-WN

🚼
DevSecOps
View GitHub Profile
#/bin/bash
declare -a remote_dirs=("sdcard/inshot/"
"sdcard/DCIM/"
"sdcard/Pictures/"
"sdcard/Download"
"sdcard/Movies/")
bak=bak_$(date +"%Y%m%d-%H%M%S")
for dir in "${remote_dirs[@]}"
@n-WN
n-WN / push_commits_by_chunks.sh
Created February 2, 2022 15:09 — forked from Sacristan/push_commits_by_chunks.sh
Push commits by chunks
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# check if the branch exists on the remote
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# # if so, only push the commits that are not on the remote already
# range=$REMOTE/$BRANCH..HEAD
# else
# # else push all the commits