How to construct a compare view on GitHub

Stéfan van der Walt stefan at sun.ac.za
Fri Oct 14 14:55:50 EDT 2011


Hi all,

Neil's question earlier this week on how to best get your code
reviewed, reminded me that GitHub has this great thing called a
compare view.

2011/10/13 Stéfan van der Walt <stefan at sun.ac.za>:
>> 3. github: I've never used git before, and I'm still getting used to
>> the terminology. What is the best way for someone to review my code?
>> I've now pushed it to a branch (neil_yager-skeletonize) in my repo
>> (NeilYager). If you were to test it out, would you fork it or pull it?

If you want someone to review code that you think is ready to be
included in the scikit, then do a PR (a pull request signals: let's
merge this!).  If, however, you just want a review, you can just make
changes on a branch and then do a compare view on GitHub and send the
link to the mailing list.

To construct a compare view, go to your repository, then to the branch
list, and click "compare" next to your feature branch (see the first
attached screenshot).  For example, here's the compare view between
the debian and master branch of the main repo:

https://github.com/scikits-image/scikits.image/compare/master...debian

Now, it often happens that you rebase one of your feature branches on
the master branch of the main repo, or that your own repository's
master branch falls behind.  In this case, the compare view may
include a bunch of spurious commits.  Fortunately, GitHub now allows
you to compare your changes against another repository.  In the
compare view, click on the "master" button, and in the pop-up box type
"scikits-image:master" (see screenshot 2). This gives you something
like:

https://github.com/stefanv/scikits.image-1/compare/scikits-image:master...emmanuelle_cellprofiler

Hope that's useful!
Stéfan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare_1.png
Type: image/png
Size: 80156 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20111014/5c98d4fc/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare_2.png
Type: image/png
Size: 62618 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20111014/5c98d4fc/attachment-0001.png>


More information about the scikit-image mailing list