[alias]
+ aa = add --all
+ br = branch
+ bv = branch -vv
+ ba = branch -ra
+ bd = branch -d
co = checkout
+ cb = checkout -b
+ ca = commit --amend
+ cm = commit -a --amend -C HEAD
ci = commit -v
- st = status
- br = branch
- cl = clone --recursive
+ ca = commit -a -v
+ dc = diff --cached
+ df = diff
+ dt = difftool
+ me = merge
+ mt = mergetool
+ st = status --short --branch
+ tg = tag -a
+ tags = tag -l
+ pu = push --tags
+ ed = config --global -e
+ ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
+ ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
+ ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
+ lg = log --all --graph --abbrev-commit --decorate --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(bold yellow)%d%C(reset)'
+ last = log -1 HEAD
type = cat-file -t
dump = cat-file -p
- cobr = checkout -b
- sts = status -s
- bra = branch -a
- brd = branch -d
- df = diff
- dc = diff --cached
who = shortlog -s --
- ed = config --global -e
- ca = commit -va
- caa = commit -va --amend -C HEAD
+
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
reb = "!r() { git rebase -i HEAD~$1; }; r"
+
+#un = reset --hard HEAD
+#uh = reset --hard HEAD^
uncommit = reset --soft HEAD~1
rmcommit = reset --hard HEAD~1
unstage = reset HEAD --
discard = checkout --
- last = log -1 HEAD
- ls = log --oneline
- hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
- # View abbreviated SHA, description, and history graphs
- lg = !"git lg1"
- lg1 = !"git lg1-specific --all"
- lg2 = !"git lg2-specific --all"
- lg3 = !"git lg3-specific --all"
- lg1-specific = log --graph --abbrev-commit --decorate --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(bold yellow)%d%C(reset)'
- lg2-specific = 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(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
- lg3-specific = 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(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
+ cl = clone --recursive
+
+ branches = branch -a
+ remotes = remote -v
+
# 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"
- diffall = !sh git-diffall.sh
- # Show verbose output about tags, branches or remotes
- tags = tag -l
- branches = branch -a
- remotes = remote -v
+
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
+
# Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f"
# Find tags containing commit
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"
+
# Remove branches that have already been merged with master
# a.k.a. ?delete merged?
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# List contributors with number of commits
contributors = shortlog --summary --numbered
root = rev-parse --show-toplevel
+ 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"
- k = !gitk
+
[color]
ui = auto
diff = auto
branch = auto
interactive = auto
grep = auto
-[color "branch"]
- current = yellow reverse
- local = yellow
- remote = green
-[color "diff"]
- meta = yellow bold
- frag = magenta bold # line info
- old = red # deletions
- new = green # additions
-[color "status"]
- added = yellow
- changed = green
- untracked = cyan
[github]
user = jannikz
[branch]
autosetupmerge = always
autosetuprebase = always
-[interactive]
- singlekey = true
[help]
autocorrect = 10
-[diff]
- renames = copies
- prompt = false
-[merge]
- summary = true
[pull]
rebase = true
[push]
templatedir = ~/.git_template
[core]
excludesfile = ~/.gitignore_global
+ editor = vim
+ pager = less
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
-# pager = less -S
+[diff]
+ tool = vimdiff
+[difftool]
+ prompt = false
+[merge]
+ tool = vimdiff
+ conflictstyle = diff3
+[mergetool]
+ prompt = false