[Vm-dev] checking out pull request locally

Ben Coman btc at openinworld.com
Tue Oct 3 16:04:52 UTC 2017

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 = git at github.com: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

[1] https://gist.github.com/piscisaureus/3342247
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171004/b4413dd5/attachment.html>

More information about the Vm-dev mailing list