Skip to content

Instantly share code, notes, and snippets.

@lushc
Created November 27, 2013 18:34
Show Gist options
  • Save lushc/7680822 to your computer and use it in GitHub Desktop.
Save lushc/7680822 to your computer and use it in GitHub Desktop.
Sync an out-dated fork
remote=upstream ; for brname in `git branch -r | grep upstream | grep -v master | grep -v HEAD | sed -e 's/.*\///g'`; do git branch --track $brname $remote/$brname ; done
git pull --rebase --all
git push --all origin
git push --tags origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment