Some useful and frequently used Git log commands

git log commands

I usually use Git log commands to check changes in my plugins and themes. While some app like SourceTree does that job very well, I prefer command lines in some situations. Here are some git log commands that I use quite a lot.

1. Show list of commits

git log --graph --oneline

If you use zsh, you can simply use

glol

2. Show only file names in commits

git log --graph --oneline --name-only

3. Show full commits

git log -p

If you use zsh, you can use

glgp

4. Show git log of a specific commit

git show ac29810

5. Show the change history of a file

git log --graph --oneline [filename]

6. Show change of a file in a specific commit

git show ac29810 [filename]

Leave a Reply

Meta Box - Creating expert WordPress custom fields and custom meta boxes in minutes! Check it out →