<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Jun 25, 2017 08:12, "Jakub Wilk" <<a href="mailto:jwilk@jwilk.net">jwilk@jwilk.net</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* Paul Sokolovsky <<a href="mailto:pmiscml@gmail.com" target="_blank">pmiscml@gmail.com</a>>, 2017-06-25, 11:47:<div class="quoted-text"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A GitHub PR is just a git branch (in somebody else's repository, but also in the repository it's submitted to). So, like any git branch, you can fetch it, re-branch to your local branch, apply any changes to it, rebase, push anywhere.<br>
</blockquote>
<br></div>
Right, this is documented here:<br>
<a href="https://help.github.com/articles/checking-out-pull-requests-locally/" rel="noreferrer" target="_blank">https://help.github.com/articl<wbr>es/checking-out-pull-requests-<wbr>locally/</a><div class="quoted-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There're also various tools for dealing specifically with git branch layout as used by Github, and every real man writes their own<br>
</blockquote>
<br></div>
I have this in my gitconfig:<br>
<br>
[alias]<br>
        hub-pr = ! "_g() { set -e -u; git fetch origin \"pull/$1/head:gh-$1\" && git checkout \"gh-$1\"; }; _g"<br>
<br>
If I want to checkout PR#42, I do:<br>
<br>
$ git hub-pr 42</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I believe you and Paul are missing the specific problem that Antoine was talking about, which is: how can we easily make changes *to someone else's PR*, i.e. these changes should show up in the diff view if you go to the PR's web page. This requires not just getting a copy of the PR branch locally, but also pushing it back to the original submitter's branch on GitHub.</div><div dir="auto"><br></div><div dir="auto">Allegedly this is possible in most cases (there's a permissions toggle the submitter can set, but it's set by default):</div><div dir="auto"><br></div><div dir="auto"> <a href="https://help.github.com/articles/committing-changes-to-a-pull-request-branch-created-from-a-fork/">https://help.github.com/articles/committing-changes-to-a-pull-request-branch-created-from-a-fork/</a></div><div dir="auto"><br></div><div dir="auto">However, like Antoine, when I've tried to do this then all I've managed is to get obscure errors from GitHub. Did I have the wrong incantations? Was the permissions toggle set wrong? (I thought the web ui said it wasn't, but maybe I misunderstood.) It's a mystery. Has anyone figured out how to make *this* work reliably or ergonomically?</div><div dir="auto"><br></div><div dir="auto">Also, as a general comment, not directed at Jakub: the posturing about how easy git is reminds me of the posturing about how much better language X is than others described here: <a href="http://blog.aurynn.com/contempt-culture-2">http://blog.aurynn.com/contempt-culture-2</a>. My dudes, in a previous life I helped invent distributed VCS, but I still get confused by fiddly git BS just like everyone else. I know you probably aren't meaning to go around telling people that they're not Real Programmers because they get confused like me, but you are and it's not kind; please stop.</div><div dir="auto"><br></div><div dir="auto">-n</div></div>