Skip to content

Instantly share code, notes, and snippets.

@leoasis
Created November 17, 2014 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leoasis/3f941b6652f6f93cc1d6 to your computer and use it in GitHub Desktop.
Save leoasis/3f941b6652f6f93cc1d6 to your computer and use it in GitHub Desktop.
Git alias to sync your branch from an upstream repo
[alias]
sync = !"sh -c 'git pull upstream ${1-$(git symbolic-ref --short -q HEAD)}; git push' -"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment