dotfiles/.gitconfig
2020-03-03 13:05:08 -08:00

51 lines
1.3 KiB
INI

[user]
name = Barak Michener
email = me@barakmich.com
[alias]
st = status -uno
stat = status -uno
ci = commit
co = checkout
w = whatchanged
revert = checkout -f
stagediff = diff --staged
sdiff = diff --staged
graph = log --graph --oneline
submodule-pull = submodule foreach git pull
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
praise = blame
; blame = "gblame"
reabsorb = rebase -i --autosquash
flog = "!f() { git ls-tree -r --full-name HEAD | awk '{print $4}' | xargs -i sh -c 'echo $(git log --oneline {} | wc -l) {}'; }; f"
fileprimary = "!f() { git blame --line-porcelain $@ | grep \"author \" | cut -d \" \" -f 2- | sort | uniq -c | sort -n | tail -n 1 | sed -e 's/\\s\\+[0-9]\\+ //g'; }; f"
newbranch = "!f() { git fetch origin && git checkout origin/master && git checkout -b $@; }; f"
nb = newbranch
[diff]
renamelimit = 0
[merge]
conflictstyle = diff3
[color]
diff = auto
interactive = auto
status = auto
branch = auto
[core]
autocrlf = input
;[push]
;default = simple
[push]
default = current
[rerere]
enabled = true
[url "git@github.com:"]
insteadOf = https://github.com
[url "git@git.barakmich.com:"]
insteadOf = https://git.barakmich.com