How to know the last commit using Git

July 12, 2024

You can use git log -1 thats show you the most recent commit, including details like the commit hash, author, date, and commit message.

git log -1

Also you can use git show --oneline -s, this will display just the commit hash and the commit message of the last commit.

git show --oneline -s