Created
September 14, 2011 10:03
-
-
Save pcreux/1216235 to your computer and use it in GitHub Desktop.
Zsh function - set upstream to origin so that you can pull / push from the current branch without specifying the remote one
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
git-set-upstream () { | |
local branch=`git branch | grep '*' | sed 's/* //'` | |
git branch --set-upstream $branch origin/$branch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment