Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fetch Github's Pull Request as a remote branch
#!/usr/bin/env bash
git remote -v | grep fetch | grep github | \
while read remote url _; do
if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull
then
git config --add "remote.$remote.fetch" \
'+refs/pull/*/head:refs/remotes/'"$remote"'/pull/*'
fi
done
@chernjie

This comment has been minimized.

Copy link
Owner Author

@chernjie chernjie commented Feb 9, 2015

c/o @hyperair

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