Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 541 Bytes

git-log.md

File metadata and controls

24 lines (17 loc) · 541 Bytes

< Back to Nuggets


Git log

Git log is the tool for understanding the history of your repository.

# Only show commits made on the current branch.
# If you have followed gitflow and use this command on dev,
# this will only show pull request merge commits. 
git log --first-parent

# Files changed in the last 5 commits
git log --name-status --pretty=oneline -n 5

# See the changes of a file, works even 
# if the file was deleted
git log -- <file path>

# List amount of commits per author
git shortlog -s -n