Github log format
•
•
3 min read
git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"Overview
-git logis a command to view the commit history of a Git repository.--graphdisplays a graph of commits, which makes it easy to see the relationship between commits.--prettyis used to set the display format of the commit history."%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"is the display format used for each commit. This format includes:%Cred%h%Cresetto display the commit hash in red.-%C(auto)%d%Cresetto display the branch and tag in the convention color.%sto display the commit message.%Cgreen(%ad)to display the commit date in green.%C(bold blue)<%an>%Cresetto display the committer name in bold blue.
Create Alias glod with git
To create an alias using Git, use the command:
git config --global alias.glod "log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset\""We can then call the alias from within git by using the command:
git glodThe commit history will be presented in a clearer and more informative layout.