On Tue, Dec 2, 2014 at 2:43 PM, Federico Bruni <f...@inventati.org> wrote:

> Hi all
> I'm reading this guide:
> https://help.github.com/articles/checking-out-pull-requests-locally/
> I see that I can easily checkout the branch submitted through a pull
> request with this command:
> git fetch origin pull/ID/head:BRANCHNAME
> git checkout BRANCHNAME
These instructions are modifying an inactive pull request. Looking at the
first section about modifying an *active* pull request locally it mentions
following commands given at the bottom of a pull request. Those commands
are for merging but the same principle applies. Step 1 of that help is
about getting the pull request into a local branch and step 2 is all about
merging with the master. All you care about is step 1:

git checkout -b fedelibre-oaken-bucket master
git pull g...@github.com:fedelibre/The-Mutopia-Project.git oaken-bucket

That is,
a. create a branch (under master) called fedelibre-oaken-bucket and switch
to it
b. pull (fetch and merge) the changes in the request into that branch

Now you can build the pdf and review. When done you can delete the branch:

git checkout master
git br -D fedelibre-oaken-bucket

Submitting any edits you make in this local branch could still be processed
in a reasonable manner by submitting another pull request. I've made a
small test edit which I merged to my origin:

# edit & commit a new date into the "lastupdated" field as a test
git push origin fedelibre-oaken-bucket

The pull request is here:


GIT keeps track rather nicely.


> Now, if the author of the pull request add one or more commits, what's the
> best way to update it to the last commit?
> If I repeat the fetch above I get this error:
> fatal: Refusing to fetch into current branch refs/heads/search of non-bare
> repository
> The simple (stupid) solution I found is deleting the branch so I can
> repeat the two commands above without any problem. But I'm sure that
> there's something better.
> Mmmmh, I think I found it. If I checkout master again and run the fetch
> again it works.
> I guess that I'm missing what the fetch does.
> Anyway, do you think it's worth adding a small page  in the wiki about
> reviewing patches?
> Cheers
> Federico
> PS For Glen and Javier: what about another round of updates? Or some focus
> to close the Phase 3 milestone?
> I got a bit stuck on writing a piece from scratch. But during Christmas I
> might have some time to get some things done.
> _______________________________________________
> Mutopia-discuss mailing list
> Mutopia-discuss@mutopiaproject.org
> http://lists.bcn.mythic-beasts.com/mailman/listinfo/mutopia-discuss
Mutopia-discuss mailing list

Reply via email to