-
-
Save rjuju/5604213 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
# Add the alias | |
git config --global alias.retrack '!retrack() { git config "branch.$1.remote" $(dirname "$2"); git config "branch.$1.merge" "refs/heads/$(basename "$2")"; }; retrack' | |
# We want the local branch 'mybranch' to track the remote branch 'origin/mybranch': | |
git retrack mybranch origin/mybranch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment