Git, see a list of comments of my last N commits

If you want to use the command line you can use the --author=<your name>

For example: to see your last 5 commits

git log -n 5 --author=Salvador

If you want a simpler one line solution:

git log --oneline -n 5 --author=Salvador

Edited to add

If you like the single line version, try creating an alias for git log like this (this is what I have for zsh)

alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Now, I can just use:

glog -n 5

And I get a nice output such as:

Terminal output

Which is colourised, shows the name of the author and also shows the graph and you can still pass in other flags (such as –author) which lets you filter it even more.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)