Files
dotfiles/git/gitconfig.j2

111 lines
3.1 KiB
Django/Jinja

[user]
name = Hannes Körber
email = {{ machine.mail }}
useConfigOnly = true
{% if machine.git_gpg_sign|bool %}
signingkey = 0xB5C002530C6A2053
{% endif %}
[github]
user = hakoerber
[alias]
untrack = "rm --cached"
unstage = "reset HEAD"
unmodify = "checkout --"
ignore-changes = "update-index --assume-unchangend"
unignore-changes = "update-index --no-assume-unchanged"
visual = "!gitk --all"
staged = "diff --staged"
fe = "fetch --all --prune"
co = "checkout"
cm = "!f() { git commit --message \"$*\" ; };f"
ci = "commit"
st = "status"
br = "branch"
rb = "rebase"
rbi = "rebase --interactive"
rbc = "rebase --continue"
rba = "rebase --abort"
df = "diff"
gr = "! git graph"
ap = "add --patch"
p = "push"
pf = "push --force"
k = "!gitk --all"
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
last = "log -1 HEAD"
logl = log --graph --decorate --pretty=oneline --abbrev-commit --all
pushall = "!sh -c 'for r in $(git remote) ; do [[ "$r" != "upstream" ]] && { echo \"--- [$r] ---\" ; git push $r \"$@\" ; } ; done' -"
branch-clean = "!sh -c 'git branch --merged | grep -v -e master -e develop -e '^*' | xargs --no-run-if-empty git branch -d'"
brc = "!git branch-clean"
graph = log --graph --pretty=format:'%C(yellow)%h%Creset%C(bold red)% D%Creset %C(green)(%cr) %C(blue)%an<%ae>%Creset%n %C(bold white)%s%Creset' --all
intercommit = !bash -c 'interdiff <(git show $1) <(git show $2) | less -FRS' -
drop = !git rebase --onto $1^ --
up = !git pull --rebase --prune $@ && git submodule update --init --recursive && git branch-clean
save = "!f() { set -x ; if ! [ $1 ]; then echo 'usage: git save <branch name>'; return 1; fi; git add -A && git commit -m 'SAVEPOINT' && git branch save-$1 && git reset --hard HEAD~1; };f"
;save = !f(){echo "x$1x" && test -n $1 && echo "wat $?" && }; echo x$1x ; f()
anchor = "!f() { if ! [ $1 ]; then echo 'usage: git anchor <anchor name>'; return 1; fi; git branch anchor-$1 ; };f"
load = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -m 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
exec = "!exec "
cp = "cherry-pick"
cpa = "cherry-pick --abort"
[core]
fileMode = true
whitespace = "blank-at-eol,space-before-tab,blank-at-eof"
abbrev = 8
[color]
ui = true
[column]
ui = auto
[push]
default = upstream
[merge]
tool = vimdiff
[gc]
auto = 0
[advice]
pushNonFastForward = false
pushUpdateRejected = false
statusHints = false
commitBeforeMerge = false
detachedHead = false
[commit]
gpgSign = {{ machine.git_gpg_sign|bool }}
cleanup = strip
status = true
[status]
relativePaths = false
submoduleSummary = true
[pager]
log = less
show = less
diff = less
[gpg]
program = gpg2
[rebase]
autoSquash = true
[diff]
submodule = log
mnemonicPrefix = true
renameLimit = 1199
[branch]
autoSetupMerge = true
[clean]
requireForce = true