Created
October 13, 2010 05:42
-
-
Save putermancer/623526 to your computer and use it in GitHub Desktop.
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 track alias - easily set up a remote-tracking branch | |
[alias] | |
track = "!sh -c '[ $# = 2 ] && git branch --track \"$1\" \"$2\" && exit 0 || [ $# = 1 ] && git branch --track \"$1\" origin/\"$1\" && exit 0 || echo \"usage: git track <branch> [remote_branch] \\n\\nIf remote branch is not specified, the default is to use origin/<branch>\" && exit 1' -" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment