A stupid way I know is:
git diff commit-number1 commit-number2
any better way?
I mean I want to know the commit1 itself, I don't want to add the commit2 before it as parameter.
A stupid way I know is:
git diff commit-number1 commit-number2
any better way?
I mean I want to know the commit1 itself, I don't want to add the commit2 before it as parameter.
This is one way I know of. With git
, there always seems to be more than one way to do it.
git log -p commit1 commit2
Does
$ git log -p
do what you need?
Check out the chapter on Git Log in the Git Community Book for more examples. (Or look at the the documentation.)
Update: As others (Jakub and Bombe) already pointed out: although the above works, git show is actually the command that is intended to do exactly what was asked for.