seb
seb

Reputation: 2321

How to compare the code of two non-sequential commits in git?

I'm pretty new to git and github. The github client lets me compare the differences in the code for two sequential commits. However, I am trying to compare the code changes of two non-sequential commits.

How can I achieve this?

Upvotes: 4

Views: 1499

Answers (1)

Ruslan Osipov
Ruslan Osipov

Reputation: 5843

git diff sha1..sha2

This should do it.

Upvotes: 2

Related Questions