Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git colors and aliases configuration
# Git colors and aliases configuration provided by @rusticode
git config --global color.ui auto
git config --global color.interactive auto
git config --global alias.s status
git config --global alias.r reset
git config --global alias.alias '!git config --list | grep alias | cut -c 7-'
git config --global alias.a "!git add . && git status"
git config --global alias.aa "!git add . && git add -u . && git status"
git config --global alias.ac "!git add . && git commit"
git config --global alias.au "!git add -u . && git status"
git config --global alias.acm "!git add . && git commit -m"
git config --global alias.c commit
git config --global alias.cm "commit -m"
git config --global alias.ca "commit --amend"
git config --global alias.d "diff --color-words"
git config --global alias.dh "diff --color-words head"
git config --global alias.l "log --pretty=format:\"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate"
git config --global alias.ld "log --pretty=format:\"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --date=short"
git config --global alias.lf "log --name-status --oneline"
git config --global alias.lt "log --graph --decorate --pretty=oneline --abbrev-commit"
git config --global alias.ll "log --stat --abbrev-commit"
git config --global alias.lld "log --stat --abbrev-commit --date=short"
git config --global alias.llt "log --graph --decorate --pretty=oneline --abbrev-commit"
git config --global alias.master "checkout master"
git config --global alias.spull "svn rebase"
git config --global alias.spush "svn dcommit"
git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"
git config --global core.legacyheaders false
git config --global core.quotepath false
git config --global core.pager "less -r"
# if ↑ doesn’t work, try:
#git config --global core.pager "less -+$LESS -FRX"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.