I’m trying to get short stats between two git revisions (the current one with the previous one)
I have the following command
git diff --shortstat -b -w <SHA1 of starting commit>..<SHA1 of ending commit>
How can I elegantly and automatically specify the ending commit as the direct previous one to the starting commit I specifoed?
If you append a
^to a commit, you can get its parent:The gitrevisions man page has a lot more details on all the different ways to specify commits.