Created
January 28, 2016 20:04
-
-
Save bootcoder/f1406e0396675955393b to your computer and use it in GitHub Desktop.
add_pr_remotes
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
function add_pr_remotes() { | |
mv .git/config .git/config-orig | |
awk '/remote "origin"/ { | |
print $0 | |
getline; | |
print $0 | |
getline; | |
print $0 | |
print "\tfetch = +refs/pull/*/head:refs/remotes/origin/pr/*" | |
}1' .git/config-orig > .git/config | |
git fetch origin | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment