DEV Community

Discussion on: I love git log

Collapse
 
hoelzro profile image
Rob Hoelz

I'm with you, Andrew - I think git log is my favorite part about Git!

I personally love using git log -S $QUERY to find out "hey, when did $QUERY appear in/disappear from the repository?" I was trying to figure out some things about what was removed between GTK 2 and 3, and -S is perfect for finding things like that!

Another log feature I love answers the question "I know I made this commit recently, and it contains the substring 'hello' - but which branch was it on?" For that I use git log --author=hoelz -G hello --all --source, which will print commits I wrote whose diff contains "hello". It searches across all branches, and prints the branch it used to find each commit.