Problem
You want to see all your commits of a git repository but the default “git log” output is not very nicely formatted and verbose.
Solution
Use the following command:
git log --author="Your Name" --pretty="%C(yellow)%h%Cred%d%Creset %s%C(white), %C(green)%ar%Creset"
The output will look like this:
Of course you could also remove the –author parameter or add the –graph parameter to see some graphical branching info.
You can also write the log to a file easily (without the coloring):
git log --author="Your Name" --pretty="%h %d %s, %ar" > my-commits.txt
Leave a Reply