Skip to content

Instantly share code, notes, and snippets.

@lilydjwg
Created April 25, 2016 05:44
Show Gist options
  • Save lilydjwg/a69df17f647848ad12f94a9c7ca2ac95 to your computer and use it in GitHub Desktop.
Save lilydjwg/a69df17f647848ad12f94a9c7ca2ac95 to your computer and use it in GitHub Desktop.
gitconfig (for older versions of git)
[color]
diff = auto
status = auto
branch = auto
grep = auto
showbranch = auto
[core]
excludesfile = ~/.gitconfig.d/gitignore
quotepath = false
[alias]
st = status
co = checkout
ci = commit
br = branch
qm = merge --no-ff --no-edit
tree = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%an%Creset: %s %Cblue(%ad)%Creset'
xtree = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%an%Creset: %s %Cblue(%ar)%Creset'
reftree = reflog --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%gn%Creset: %gs %Cblue(%gd)%Creset' --date=iso
refxtree = reflog --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%gn%Creset: %gs %Cblue(%gd)%Creset' --date=relative
unstage = reset HEAD --
last = log -1 --stat
bi = bisect
sb = show-branch
diffw = diff --word-diff=color
# show branch using `less` as pager
sbc = !git show-branch --color=always|less -RXF
sbca = !git show-branch -a --color=always|less -RXF
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p };' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/Git&/g'; git log --pretty='format: Git%h[label=ASDF%sASDF,shape=box];' | sed -e 's/\"/\\\\\"/g' -e 's/ASDF/\"/g' ; echo '}'; }; f"
[log]
date = iso
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[gitli]
color = auto
[difftool]
prompt = false
[diff]
wordRegex = \\w+|\\S
[rerere]
enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment