Sources:
https://stackoverflow.com/questions/2231546/git-see-my-last-commit
https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
See my last commit in git:
//This command will display the commit hash, author, date, and commit message of the most recent commit in your repository.
git log -1
//to see the last 2 commits:
git log -2
//this show also the files
git log --name-status -1
oneliners:
git show --name-status --oneline
git show --name-status --oneline
a diff of your last commit:
git show
git log -1 --stat
It gives back only the file names, but now what happened to them.
git show --name-only
//If you have too many commits to review, this command will show them in a neat single line:
git log --pretty=oneline
//to see short, medium, full, or even more details of your commit, use following, respectively:
git log --pretty=short
git log --pretty=medium
git log --pretty=full
git log --pretty=fuller
//You can even use your own output format using the format option:
//where %an - author name, %ae - author email, %s - subject of commit, etc.
git log --pretty=format:"%an, %ae - %s"