-[init]
- templatedir = ~/.git_template
-[branch]
- autosetupmerge = always
- autosetuprebase = always
-[core]
- excludesfile = ~/.gitignore_global
- whitespace = space-before-tab,-indent-with-non-tab,trailing-space
- editor = git-editor.sh
-# pager = less -S
-[color]
- ui = auto
- diff = auto
- status = 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
-[interactive]
- singlekey = true
-[help]
- autocorrect = 10
-[diff]
- tool = git-difftool
- renames = copies
- prompt = false
-[difftool "git-difftool"]
- cmd = git-difftool.sh $LOCAL $REMOTE
-[merge]
- summary = true
- tool = git-mergetool
-[mergetool "git-mergetool"]
- cmd = git-mergetool.sh $LOCAL $REMOTE $BASE $MERGED
-[pull]
- rebase = true
-[push]
- default = tracking
-[rebase]
- autosquash = true
-[apply]
- # Detect whitespace errors when applying a patch
- whitespace = fix
[alias]
co = checkout
ci = commit -v
st = status
br = branch
cl = clone --recursive
- hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
cobr = checkout -b
dc = diff --cached
who = shortlog -s --
ed = config --global -e
- ls = log --oneline
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"
uncommit = reset --soft HEAD~1
rmcommit = reset --hard HEAD~1
- unstage = reset HEAD --
+ 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"
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)'
- # View the current working tree status using the short format
# 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
- # Pull in remote changes for the current repository and all its submodules
- p = !"git pull; git submodule foreach git pull origin master"
- # Clone a repository including all submodules
- # Switch to a branch, creating it if necessary
- go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
- # Amend the currently staged files to the latest commit
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
- # Interactive rebase with the given number of latest commits
- reb = "!r() { git rebase -i HEAD~$1; }; r"
# Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f"
# Find tags containing commit
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
- [include]
- # Local/private config goes in the include
+ k = !gitk
+[color]
+ ui = auto
+ diff = auto
+ status = 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]
+ default = tracking
+[rebase]
+ autosquash = true
+[apply]
+ whitespace = fix
+[include]
path = ~/.gitconfig_local
-
+[init]
+ templatedir = ~/.git_template
+[core]
+ excludesfile = ~/.gitignore_global
+ whitespace = space-before-tab,-indent-with-non-tab,trailing-space
+# pager = less -S