Skip to content

Instantly share code, notes, and snippets.

@hamonangann
Last active September 17, 2023 14:46
Show Gist options
  • Save hamonangann/09fbf5def2cc33c342c1dd888a6b17b5 to your computer and use it in GitHub Desktop.
Save hamonangann/09fbf5def2cc33c342c1dd888a6b17b5 to your computer and use it in GitHub Desktop.
Auto-rebase script
set -eo pipefail
while read line;
do
# create file auto-rebase.txt
# fill each line with branch name
# don't forget to end with blank line!
IFS=' '
read -a strarr <<< "$line"
BRANCH="${strarr[0]}"
git checkout $BRANCH
git fetch upstream
git rebase upstream/master
git push --force-with-lease origin $BRANCH
done < "auto-rebase.txt"
add-footer
add-navbar
bugfix-homepage-not-showing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment