For use in a script, I need to know the files modified or added in a commit, as well as the sha1 for the blob.
I can get that information, and much more, with the following command: git log -1 --raw --no-abbrev -m master
Author: [author]
Date: Wed Oct 11 07:55:45 2017 -0700
This is the commit message
:000000 100644 0000000000000000000000000000000000000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 A file1.txt
:000000 100644 0000000000000000000000000000000000000000 f73ff92ea32371a270e5af81dc2cac4cbe98890f A file2.txt
I can parse what I need from this, but it feels... untidy.
Is there some command to give me those last lines, without the Author, Date, or Commit Message?
--pretty=format:
. If you'd like the blob sha only,git rev-parse <commit-ish>:<filepath>
.