git commit number of lines changed 1

git commit number of lines changed

git log --shortstat

Here is what the above code is Doing:
1. git log -n 1 –pretty=format:”%H”
– This will get the latest commit hash
2. git log -n 1 –pretty=format:”%cd” –date=short
– This will get the latest commit date
3. git log -n 1 –pretty=format:”%s”
– This will get the latest commit message
4. git log –shortstat
– This will get the number of files changed, insertions, and deletions

Similar Posts