Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (83 sloc) 3.03 KB
[user]
name = Harmen Janssen
email = harmen@grrr.nl
signingkey = 680B7B08
[core]
autocrlf = input
safecrlf = warn
editor = vim
fileMode = false
excludesfile = ~/.gitignore
[push]
default = upstream
[alias]
# Typos
cloen = clone
# Shortcuts
co = checkout
ci = commit
st = status
br = branch
amend = commit --amend -C HEAD
fixup = commit --fixup
squash = commit --squash
rh = reset --hard
# Pretty logs and diffs
l = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ai%Creset'
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --date=short
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --numstat
lastchange = log -p --follow -n 1
changelog = diff-tree --no-commit-id --name-only
dl = "!git ll -1"
dlc = diff --cached HEAD^
dif = "!git diff --color | sed -E \"s/^([^-+ ]*)[-+ ]/\\1/\" | less -r"
# Branches, publishing, tracking, rebasing
branch-name = "!git rev-parse --abbrev-ref HEAD"
track = "!f() { git branch --track $1 origin/$1 && git co $1; }; f"
publish = "!git push -u origin $(git branch-name)"
unpublish = "!git push origin :$(git branch-name)"
unstage = reset HEAD
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" -
ff = "!f() { git merge --ff-only $1 && git branch -d $1; }; f"
rename = "branch -m"
delete = "!f() { if [ $(git log --left-right --oneline --cherry-pick $1... | sed -n -e '/^</p' | wc -l) -gt 0 ]; then git branch -d $1; else git branch -D $1; fi }; f"
# Misc
alias = "!git config -l | grep alias | cut -c 7-"
tags = tag --sort=v:refname
tt = "!git tags | tail"
ctags = !.git/hooks/ctags
type = cat-file -t
dump = cat-file -p
pop = stash pop
checkpoint = !git stash; git stash apply
feature = "!f() { git checkout -b 'feature/'$(git config user.name | cut -d' ' -f1 | awk '{print tolower($0)}')'-'$1; }; f"
hotfix = "!f() { [ x$# != x2 ]&&echo "Two arguments required!" >&2 || git checkout -b 'hotfix/'$(git config user.name | cut -d' ' -f1 | awk '{print tolower($0)}')'-'$1 $2; }; f"
branches = for-each-ref --sort=-committerdate --format=\"%(align:1,20)%(color:blue)%(authordate:relative)%(end)%(align:1,30)%(color:red)%(authorname)%(end)%(color:white)%(color:bold)%(refname:short)\" refs/remotes
[color]
ui = auto
[color "status"]
added = yellow
changed = "white yellow"
untracked = "white yellow"
branch = "white normal bold"
[mergetool]
keepBackup = true
[merge]
;conflictstyle = diff3
[rerere]
enabled = 1
[init]
templatedir = ~/.git_template
[interactive]
diffFilter = diff-highlight
[commit]
gpgsign = true
[gpg]
program = gpg
[rebase]
autosquash = true
[remote "origin"]
prune = true