Skip to content

Instantly share code, notes, and snippets.

Last active Aug 25, 2017
What would you like to do?
My git config, provides some nice shortcuts and features
# If you decide to use this, make sure you change name, email,
# and possibly editor first
name = Bennet Huber
email =
#Add colors to your ~/.gitconfig file:
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
#Highlight whitespace in diffs
ui = true
[color "diff"]
whitespace = red reverse
editor = vim
pager = less -FMRiX
excludesfile = ~/.gitignore
#autocrlf = true
#Add aliases to your ~/.gitconfig file:
st = status
ci = commit
br = branch
co = checkout
df = diff
dc = diff --cached
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
ss = stash save
sp = stash pop
pr = pull --rebase
puoh = push -u origin HEAD
pfoh = push -f origin HEAD
cp = cherry-pick
rh = reset --hard
ua = "!git ss; git pr; git smu; git sp"
sm = submodule
smu = submodule update --init
smur = submodule update --recursive
sms = submodule sync
fa = fetch --all
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
# Show files ignored by git:
ign = ls-files -o -i --exclude-standard
permission-reset = "git pull diff -p | grep -E '^(diff|old mode|new mode)' | sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' | git apply"
dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order
default = simple
append-cr-url = true
pull-request-by-default = true
setup-crv = true
enabled = true
rebase = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment