Issue #9511 duplicate

New references to branch for each pull request.

Matteo Kloiber
created an issue

Hello, Could you add a reference to every new pull request that is made so that the code in the pull request can be checked out by pulling the remote?
It would be extremely helpful when you want to checkout a new pull request to test it locally. I know there is a way to checkout new pull requests but it takes a little bit.

It is already on github and you every pull request has a own reference. When I run git ls-remote github url on a github repo, I get: SHA... refs/heads/master SHA... refs/pull/1/head

Since pull requests aren't in refs/heads, you won't have way too many branches when clone a repo, unless you change the fetch config to fetch = +refs/pull//head:refs/remotes/origin/pr/

It especially gets useful if want to automatically test the pull request on CI programs like Jenkins.

Comments (3)

  1. Log in to comment