checking out pull request locally

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

checking out pull request locally

Ben Coman
 
I learnt a cool new trick today from [1].
From the opensmalltalk-vm root folder...
$ vi .git/config

I ended up with...
[remote "origin"]
        url = [hidden email]:OpenSmalltalk/opensmalltalk-vm.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/pull/*/head:refs/remotes/PR/*

and thus for example can now do...
$ git fetch origin     # i.e. from github server
$ git checkout PR/136

Per the provided message, you review the PR in a detached HEAD state since its not a local branch, but that is no big deal for read only and instructions are provided to use -b to turn it into a local branch.

Back to your regularly scheduled program via...
$ git checkout Cog

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: checking out pull request locally

timrowledge
 

> On 03-10-2017, at 9:04 AM, Ben Coman <[hidden email]> wrote:
>
> I learnt a cool new trick today from [1].

[snip]

y’know, I’m almost sure the words in your message were actual English, and yet the message as a whole was entirely in Klingon. ;-)


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
"Oh bother" said Pooh, as he reached for the reset button