Created
July 8, 2009 12:41
-
-
Save cypher/142803 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 config --global alias.track '! track() { | |
branch=$(git branch | sed -ne "s/^\*\ \(.*\)$/\1/p") | |
remote=$1 | |
git config "branch.$branch.remote" $(dirname "$remote") | |
git config "branch.$branch.merge" "refs/heads/$(basename "$remote")" | |
} | |
track' | |
git track origin/foobar # sets up the current branch to track origin/foobar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment