myshellconfig/.gitconfig
2021-10-19 12:07:58 +02:00

50 lines
2 KiB
INI
Executable file

[credential]
helper = cache --timeout=1200
[user]
name = Jakobus Schürz
email = jakobus.schuerz@schuerz.at
[author]
name = Jakobus Schürz
email = jakobus.schuerz@schuerz.at
[committer]
name = Jakobus Schürz
email = jakobus.schuerz@schuerz.at
[push]
default = simple
[core]
editor = vim
excludesFile = ~/.gitignore_global
[diff]
submodule = log
[alias]
last = log -1 HEAD
unstage = reset HEAD --
visual = !gitk
tree = log --oneline --decorate --graph --all
treedate = log --oneline --decorate --graph --all --date-order --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%C(cyan)%h%Creset %C(black bold)%ad%Creset%C(auto)%d %s'
treefull = log --graph --all
hist = log --pretty=format:'%h %ad | %s%d [%an : %cn]' --graph --date=short
fixcached = rm -r --cached .
delete-last-commit = reset --soft HEAD~1
purge-last-commit = reset --hard HEAD~1
pushdetachedhead = push origin HEAD:master
getbranchauthor = "!f() { git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n; }; f"
getbranchcommitter = "!f() { git for-each-ref --format='%(committerdate) %09 %(committername) %09 %(refname)' | sort -k5n -k2M -k3n -k4n; }; f"
grepp = grep --break --heading --line-number
grephist = "!f() { regex=$1; git grep --break --heading --line-number -e $regex $(git rev-list --all); }; f"
sdiff = !"git diff && git submodule foreach 'git diff'"
spush = push --recurse-submodules=on-demand
supdate = submodule update --remote --merge
pushup = "!gitbranchname() { git symbolic-ref --short HEAD; }; gitpushupstream() { git push --set-upstream origin `gitbranchname`; }; gitpushupstream"
permission-reset = !git diff -p -R --no-ext-diff --no-color | grep -E \"^(diff|(old|new) mode)\" --color=never | git apply
[merge]
conflictstyle = diff3
tool = vimdiff
[mergetool]
prompt = false
[include]
path = ~/.gitconfig_local
[status]
submodulesummary = 1
[pull]
rebase = true