Skip to main content

Nicely formatted git

12th October, 2022

Updated: 12th October, 2022

    git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

    alias

    git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

    And every time you need to see your log, just type in git lg

    Or, if you want to see the lines that changed git lg -p

    add -n 10 to only show the last 10 git lg -n 10


    2c399815-bd04-4f8f-bc61-46e488d8456b

    Created on: 12th October, 2022

    Last updated: 12th October, 2022

    Tagged With: