Created
September 17, 2019 16:53
-
-
Save kastiglione/a401678a37e709e4a3c3557366edaa1d to your computer and use it in GitHub Desktop.
git fetch config
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
addbranch() { | |
local branch=$1 | |
git config --add remote.origin.fetch "+refs/heads/${branch}:refs/remotes/origin/${branch}" | |
git fetch | |
git checkout "$branch" | |
} |
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
# My prefix is dl/ | |
git config remote.origin.fetch "+refs/heads/master:refs/remotes/origin/master" | |
git config --add remote.origin.fetch "+refs/heads/dl/*:refs/remotes/origin/dl/*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment