Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active January 29, 2021 07:22
Show Gist options
  • Save zoonderkins/a44c1813ab981d2b1008e0a4fd60bb54 to your computer and use it in GitHub Desktop.
Save zoonderkins/a44c1813ab981d2b1008e0a4fd60bb54 to your computer and use it in GitHub Desktop.
git-pretty

Git pretty with some tweak and alias

# paste into your terminal to create a Git 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"

Example

git lg 

## Line of change

git lg -p 

## 
git log --graph --pretty=format:'%h -%d %s (%cr) <%an>' --abbrev-commit

# one line commit + branch
git log --oneline --abbrev-commit --all --graph --decorate --color

# 
git log --decorate --graph --abbrev-commit --date=relative

## No merge
git log --format='%Cred%h%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset%C(yellow)%d%Creset' --no-merges

Ungit

npm install -g ungit && ungit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment