- Given this answer to another question, and
- given that the man pages for both git-log and git-whatchanged say they pull from git-rev-list...
...what then is the difference between the two commands? Why bother having both of them?
...what then is the difference between the two commands? Why bother having both of them?
I don't totally agree. Can you see merge changed files with
log
?I didn't find this functionality and is very useful for to know when a file was merged in some branch, example:
file c.c
inbranch1
has a commit date from 1/1/2012, if you do a merge tobranch2
, and later would like to follow the day that that commit was introduced inbranch2
, cangit log
help? If you have the merges you could search in them withgit whatchanged -m sha1
The commit 52f425e1 (August, 30th 2013) mentions:
That is what the new version of the man page for
git whatchanged
will say now:In their simplest form, 'git log' shows each commit (sha, author, date, message) whereas 'git whatchanged' shows the commit plus files that changed. For example:
but for whatchanged:
Plenty of options exist to change the output of each command. For example 'git whatchanged -p' shows the changes in diff/patch form.