[python-committers] Guide to pushing to submitters' repo?

Zachary Ware zachary.ware+pydev at gmail.com
Thu May 25 10:05:31 EDT 2017


On Thu, May 25, 2017 at 6:27 AM, Antoine Pitrou <antoine at python.org> wrote:
>
> Le 25/05/2017 à 15:06, Nick Coghlan a écrit :
>> On 25 May 2017 at 18:01, Antoine Pitrou <antoine at python.org> wrote:
>>> Did someone manage to make this work?  Can they post the entire
>>> instructions they used? (including local branch setup)
>>
>> The minimal set of instructions some of us worked out are at
>> https://docs.python.org/devguide/gitbootcamp.html#editing-a-pull-request-prior-to-merging
>> (the initial draft was longer, but patch review found a few
>> opportunities for simplification)
>
> Thank you.  Is it possible for the "git pr" alias to also edit the
> branch tracking information?  Currently I get:
>
> (master)$ git pr 1785
> Depuis https://github.com/python/cpython
>  * [nouvelle référence] refs/pull/1785/head -> pr_1785
> Basculement sur la branche 'pr_1785'
>
> (pr_1785)$ LANG=C git pull
> There is no tracking information for the current branch.
> Please specify which branch you want to merge with.
> See git-pull(1) for details.
>
>     git pull <remote> <branch>
>
> If you wish to set tracking information for this branch you can do so with:
>
>     git branch --set-upstream-to=<remote>/<branch> pr_1785

Unfortunately, GitHub does not allow pushing back to refs/pull/*.  To
get it to set you up to push back to the contributor's repo, you'd
need to provide the contributor's name and branch name, which is much
less convenient if you're just looking to try out a patch locally
without intending to push anything back.  If I can figure out a good
second alias for that, I'll be sure to share it.

You may be interested in the `hub` tool, which has a command for
'check out this PR and set up a remote for it' (though I can't
remember what it is at the moment).

-- 
Zach


More information about the python-committers mailing list