Skip to content

Instantly share code, notes, and snippets.

@balexandre
Last active September 14, 2025 20:53
Show Gist options
  • Save balexandre/89968dd746d45f06b67ad2b4df194c2f to your computer and use it in GitHub Desktop.
Save balexandre/89968dd746d45f06b67ad2b4df194c2f to your computer and use it in GitHub Desktop.
my custom gitconfig with some very used alias
[user]
name = Bruno Alexandre
email = < email address >
[alias]
co = checkout
br = branch
unstage = reset HEAD --
last = log -1 HEAD
visual = !gitk
pp = !git fetch --all --prune && git pull
resethard = reset --hard HEAD~1
reset = reset HEAD~1
lg = lg1
lg1 = log --graph --abbrev-commit --date=relative --branches --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n'
lg2 = log --graph --abbrev-commit --decorate --date=short --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg4 = log --graph --abbrev-commit --all --pretty=oneline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment