When I do git diff COMMIT
I see the changes between that commit and HEAD (afaik) but I would like to see the changes that were made by that single commit.
I haven't found any obvious options on diff/log that will give me that output.
When I do I haven't found any obvious options on diff/log that will give me that output. |
|||||
|
To see the diff for a particular
Alternatively, |
|||||||||||||||||||||
|
As mentioned in "Shorthand for diff of git commit with its parent?", you can also use
or
With git show, you would need (in order to focus on diff alone) to do:
The
See gitrevision "SPECIFYING REVISIONS" to reference a commit-ish. |
|||||||||||||||||||||
|
You can also try this in easy way :
|
|||||||||||||
|
Equivalent to
|
|||
|
From the man page for git-diff(1):
Use the 3rd one in the middle:
Also from the same man page, at the bottom, in the Examples section:
Admittedly it's worded a little confusingly, it would be less confusing as
|
|||||||||||||||||||||
|
this seems to do the job; i use it to show what has been brought in by a merge.
|
|||||
|
Another possibility:
|
|||||||||
|
is also possible if you have configured your difftool. See here how to configure difftool Or the manual page here Additionally you can use |
||||
|
To see author and time by commit use
If you want to see which files had been changed, run the following with the values from the Merge line above If you want to see the actual diff, run |
|||
|
you could use if you only wanna see the list of files, add the option |
||||
|
this command will get you the git parent commit-hash
after that Ex:
after this
|
|||
|
I'm running git version 2.6.1.windows.1 on Windows 10, so I needed a slight modification to Nevik's answer (tilde instead of caret):
Other option is to quote the caret:
|
|||
|