Poperton
Poperton

Reputation: 1806

How to see changes from commit x to y on github?

I'm trying to see all modifications made from 06e27fd143240e8e4d13b29db831bedece2bf2d3 to the latest e1c34175b5556ac5ce1e60ba56db2493dd9f6b52. I tried

https://github.com/gaganmalvi/kernel_xiaomi_lime/compare/Q:e1c34175b5556ac5ce1e60ba56db2493dd9f6b52%5E%5E%5E%5E%5E...Q:06e27fd143240e8e4d13b29db831bedece2bf2d3

and vice-versa but it does not work.

Also I tried https://github.com/gaganmalvi/kernel_xiaomi_lime/compare/06e27fd143240e8e4d13b29db831bedece2bf2d3%5E%5E%5E%5E%5E...Q which seems to work but brings changes from 2017, but the changes I want to see are from dec 2020 and beyond.

Upvotes: 1

Views: 851

Answers (3)

Piotr
Piotr

Reputation: 712

Does

git diff e1c34175b5556ac5ce1e60ba56db2493dd9f6b52 06e27fd143240e8e4d13b29db831bedece2bf2d3

not work?

Upvotes: -1

knittl
knittl

Reputation: 265918

To compare commits in GitHub, there are two options, sharing the syntax with the git diff syntax:

  • A..B to show the difference between commit A and B (this is equivalent to diff A B)
  • A...B to show the difference between "merge base of A and B" and B (this is indeed equivalent to diff $(merge-base A B) B

GitHub URLs:

Upvotes: 1

Juraj
Juraj

Reputation: 3736

Your compare URL could be something like

https://github.com/gaganmalvi/kernel_xiaomi_lime/compare/Q..02ca1a9

Q is the name of the only branch in that repository. It is used here for the HEAD of the repository.

02ca1a9 is the "Git Object ID" for the state of the repository after the last commit in Dec 2020.

GitHub documentation for comparing commits

enter image description here

Upvotes: 1

Related Questions