Another potentially neat Git command to share. This time we are going to see how to list commits in a Git repository. This could be useful when writing scripts or from a personal experience in a CI/CD scenario with a bit of text processing.
Step 1. The command we are looking for is
git log, although there are few variations you could try depending on the output you are looking for. You could try each of them though.
git log git reflog git log --oneline git log --name-only
Needless to say, all of them include the git hash with a few minor dissimilarities. The one that I’m using mostly on daily basis is
git log --name-only.