Skip to content

Instantly share code, notes, and snippets.

@kormat
Created April 18, 2017 12:55
Show Gist options
  • Save kormat/8a78e149a854af11e01a0231a4e785f9 to your computer and use it in GitHub Desktop.
Save kormat/8a78e149a854af11e01a0231a4e785f9 to your computer and use it in GitHub Desktop.
#!/bin/bash
[ -n "$1" ] || { echo "Must supply remote name"; exit 1; }
orig=$(git config --get remote."$1".fetch)
echo "$orig"
git config --add remote."$1".fetch "+refs/pull/*/head:refs/remotes/$1/pr/*"
@kormat
Copy link
Author

kormat commented Apr 18, 2017

This sets up the lines in the wrong order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment