Skip to content

Instantly share code, notes, and snippets.

@childnode
Last active September 19, 2016 12:41
Show Gist options
  • Save childnode/66d4b982332824bb8750703aaa1ab0d6 to your computer and use it in GitHub Desktop.
Save childnode/66d4b982332824bb8750703aaa1ab0d6 to your computer and use it in GitHub Desktop.
currentBranch="$(git branch -q --no-column --no-color | grep '^*' | awk '{print $2}')";
for branch in $(git branch -q --no-column --no-color | sed -e 's/^*/ /'); do
git rebase origin/${branch} ${branch} --onto origin/${branch};
done
git co ${currentBranch}
unset currentBranch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment