Per: Difference between git-log and git-whatchanged?
Encourage new users to use 'log' instead. These days, these commands are unified and just have different defaults.
I only recently discovered git whatchanged
but found its output:
commit deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
Author: Egg Sample <mail@example.com>
Date: Mon Jan 28 16:32:04 2019 -0800
change some files
:100777 100644 abaddad1 feeb1e42 M src/changemymode.txt
:100644 100644 1234abcd abcd1234 M src/changemycontent.txt
:000000 100755 00000000 6600abcd A src/addme.txt
:100755 000000 feed1bee 00000000 D src/deleteme.txt
useful for a particular workflow I had recently (involving a branch with many file mode changes). Out of curiosity, what would I need to do to make git log
behave in such a manner, i.e.:
Modified|Added|Deleted
and filenames of the files that changedgit whatchanged
behavior).I figured it might be something in the --stat
or --format
options, but git log --help
doesn't seem to mention anything about getting the file modes and object hashes printed in conjunction with these options, and a quick scan of said document doesn't have anything jump out at me.
Just so this question is not left unanswered:
By this revised answer, newer versions of git explain this on man git-whatchanged
The whatchanged command is essentially the same as git-log(1) but defaults to show the raw format diff output and to skip merges.
So:
git log --raw --no-merges