# ~/.gitconfig
[github]
- user = jannikz
+ user = jannikz
[alias]
- aa = add -uv
- unaa = reset --mixed HEAD
- uhaa = reset --hard HEAD
- br = branch
- brv = branch -vv
- bra = branch -ra
- brd = branch -d
- brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
- co = checkout
- cob = checkout -b
- go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
- ci = commit -v
- cia = commit -av
- ciam = commit -av --amend
- unci = reset --mixed HEAD~
- uhci = reset --hard HEAD~
- dt = difftool
- dtc = difftool --cached
- mt = mergetool
- st = status --short --branch
- tg = tag -l
- reb = "!r() { git rebase -i HEAD~$1; }; r"
- pu = push --tags
- pl = pull --rebase
- ed = config --global -e
- lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
- ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
- tail = !"git lg -10 HEAD"
- last = log -1 HEAD
- type = cat-file -t
- dump = cat-file -p
- who = shortlog -s --
- remotes = remote -v
- root = rev-parse --show-toplevel
+ aa = add -uv
+ unaa = reset --mixed HEAD
+ uhaa = reset --hard HEAD
+ br = branch
+ brv = branch -vv
+ bra = branch -ra
+ brd = branch -d
+ brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
+ co = checkout
+ cob = checkout -b
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
+ ci = commit -v
+ cia = commit -av
+ ciam = commit -av --amend
+ unci = reset --mixed HEAD~
+ uhci = reset --hard HEAD~
+ dt = difftool
+ dtc = difftool --cached
+ mt = mergetool
+ st = status --short --branch
+ tg = tag -l
+ reb = "!r() { git rebase -i HEAD~$1; }; r"
+ pu = push --tags
+ pl = pull --rebase
+ ed = config --global -e
+ lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
+ ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
+ tail = !"git lg -10 HEAD"
+ last = log -1 HEAD
+ type = cat-file -t
+ dump = cat-file -p
+ who = shortlog -s --
+ remotes = remote -v
+ root = rev-parse --show-toplevel
- cl = clone --recursive
+ cl = clone --recursive
- # Show the diff between the latest commit and the current state
- d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
- # `git di $number` shows the diff between the state `$number` revisions ago and the current state
- di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
+ # Show the diff between the latest commit and the current state
+ d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
+ # `git di $number` shows the diff between the state `$number` revisions ago and the current state
+ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
- # Find branches containing commit
- fb = "!f() { git branch -a --contains $1; }; f"
- # Find tags containing commit
- ft = "!f() { git describe --always --contains $1; }; f"
- # Find commits by source code
- fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
- # Find commits by commit message
- fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
+ # Find branches containing commit
+ fb = "!f() { git branch -a --contains $1; }; f"
+ # Find tags containing commit
+ ft = "!f() { git describe --always --contains $1; }; f"
+ # Find commits by source code
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
+ # Find commits by commit message
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# Credit an author on the latest commit
- credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
- # List contributors with number of commits
- contributors = shortlog --summary --numbered
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
+ # List contributors with number of commits
+ contributors = shortlog --summary --numbered
- k = !gitk
+ k = !gitk
- ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
- gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"
- cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"
+ ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
+ gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"
+ cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"
[help]
- autocorrect = 10
+ autocorrect = 10
[branch]
- autosetupmerge = always
- autosetuprebase = always
+ autosetupmerge = always
+ autosetuprebase = always
[branch "master"]
- rebase = true
+ rebase = true
[rebase]
- autostash = true
+ autostash = true
[pull]
- rebase = true
+ rebase = true
[push]
- default = tracking
+ default = tracking
[include]
- path = ~/.gitconfig_local
+ path = ~/.gitconfig_local
[init]
- templatedir = ~/.git_template
+ templatedir = ~/.git_template
[core]
- excludesfile = ~/.gitignore_global
- autocrlf = input
+ excludesfile = ~/.gitignore_global
+ autocrlf = false
+ editor = vim
[diff]
- tool = vimdiff
+ tool = vimdiff
[difftool]
- prompt = false
+ prompt = false
[merge]
- tool = vimdiff
- conflictstyle = diff3
+ tool = vimdiff
+ conflictstyle = diff3
[mergetool]
- prompt = false
+ prompt = false