Skip to content

Instantly share code, notes, and snippets.

@adelton
Last active June 23, 2020 20:23
Show Gist options
  • Save adelton/10831818 to your computer and use it in GitHub Desktop.
Save adelton/10831818 to your computer and use it in GitHub Desktop.
Fetch single pull request from github
In projects where I only participate in some small areas, I often want to fetch
or update just one (or few) particular pull request, without polluting my repo with the full
fetch = +refs/pull/*/head:refs/pull/origin/*
configuration. To do that, one-off command like
git fetch origin refs/pull/529/head:pr-529 -f
does the trick.
For GitLab, the command will be
git fetch origin refs/merge-requests/1123/head:pr-1123 -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment