scribble

Emacs Perú User Group

About elpa

30 Jun 2015
Checking out github pull requests locally with magit

Github offers the ref /refs/pull to download the pull requests from a repository, this is really useful for reviewing changes, testing locally, cherry picking, etc; and using it with magit makes the whole process really simple.

The following snippet automatically adds the refspec of origin remote to the .git/config and when called interactively will ask you for a remote and a local namespace for the refspec, this is useful when you have a remote upstream and want to check its pull requests.

If you don’t want that automatically adds a refspec in a repository, you can change disable it with:

git config core.disableprref true

and for disabling it to the origin remote:

git config remote.origin.disableprref true

p.s. This feature is also available in Stash but not in bitbucket.


Til next time,
at 00:00

scribble

About elpa