Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you view an aggregate changeset in git? If so, how?

Tags:

git

diff

In Subversion you can specify a range of versions to get an aggregate view of a series of commits. Is this possible in git? If so, how?

like image 665
Teflon Ted Avatar asked Sep 11 '08 11:09

Teflon Ted


1 Answers

You can pass ranges of revisions using the .. (and ...) operator.

git diff 6d0918...HEAD

instead of giving (abbreviated) SHA hashes, you can also denote revisions relative to branches and tags:

git diff HEAD~4 # shows the diff from the last four commits to the current one

Have a look at the chapter "Specifying Revisions" in the git-rev-parse manual page

like image 139
pilif Avatar answered Sep 28 '22 04:09

pilif