Short version
When I compare two forks on Github, it does not compare the latest states, but the current state of the base fork with the last common commit (or am I wrong?); so how can I compare the latest states/heads on Github?
Longer version
I am trying to compare two repositories on Github.
It does not seem to compare the latest states of both repository. Instead, it compares:
with
You can see this in the Github's fork comparison example, it says there are no changes between those two repositories, but there are now very different.
How can I compare the latest states/heads on Github?
https://github.com/github/linguist/compare/master...gjtorikian:master
github:master
is up to date with all commits fromgjtorikian:master
.
Try switching the base for your comparison.
It means that all commits from gjtorikian/liguist are part of github/linguist
.
The reverse is not true:
https://github.com/gjtorikian/linguist/compare/master...github:master
That would give all (1866) commits from github/linguist
which are not part of gjtorikian/linkguist
.
This is triple-dot '...
' diff between the common ancestor of two branches and the second branch (see "What are the differences between double-dot “..
” and triple-dot “…
” in Git diff commit ranges?"):
In the first case github/linguist:master...gjtorikian/linguist:master
, the common ancestor and gjtorikian/linguist:master
are the same! O commits.
In the second case gjtorikian/linguist:master...github/linguist:master
, github/linguist:master
has 1866 commits since the common ancestor (here, since gjtorikian/linguist:master
).
As a side note, the compare of forks can be reached from the compare page.
Say your project is Zipios:
https://github.com/Zipios/Zipios
What you want to do is add the .../compare
to that URL:
https://github.com/Zipios/Zipios/compare
On that page, you can select two branches but if you look closely, at the top there is a link that says: compare across forks.
Once you clicked on that link, it shows you two extra dropdowns with your main branch and the list of forks.
What I have yet to discover is how to go from the main page of a project to the Compare page. Maybe someone could shed light on that part?
From @somerandomdev49:
To go to the compare page, go to the "Pull Requests" tab and click the "Create Pull Request" button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With