Git Log Guides
Git log will print a the last
n commits in a repo. Learn more in the guides below
This is a collection of top and trending guides written by the community on subjects related to Git Log concepts. For all things git, check out the git tag! Please contribute more posts like this to help your fellow developer in need.
I think we shouldn't confound
git logshould be like reading a story. By reading the log, I should be able to understand in ~10s the whole file history.
We know that when it comes to logging or let’s say log files, it’s all about investigating or searching in the history for sure of your system or program that you’re working on, to know what’s going on with your stuff and check the current state of your system or program.
In short, it's this:
git log --decorate --graph --simplify-by-decoration --oneline [--all]
A couple of git aliases for git log pretty print. Add them to your
.bashrcfor usage and source the file e.g.
source ~/.zshrc, or restart your terminal for the changes to apply.
git log -L 50,75:./some/path/file.ext
Git without saying is a fantastic tool; but
git logby default is a little ugly and actually sometimes can be a little difficult to read branches and merges quickly and accurately.
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
git logis a powerful command which shows commit history.
Happy Git Log coding!