Created
March 9, 2011 20:12
-
-
Save nickyleach/862899 to your computer and use it in GitHub Desktop.
git alias to sync the current branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
sync = "!f(){ local branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e \"s/* \\(.*\\)/\\1/\"`; git pull origin $branch && git push origin $branch; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good morning Nick.
I found your git-sync alias quite useful.
I recently published a small post on my blog about it, I hope this would not displease you.
This is the link:
http://jesuswasrasta.com/gitpills/git-pills-a-sync-alias-command-to-pull-and-push-in-one-shot.html
Bye :)
Nando