-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
70 lines (60 loc) · 2.77 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[user]
name = Hannu Hartikainen
email = [email protected]
[github]
user = dancek
[core]
excludesfile = ~/.gitignore
pager = delta
[alias]
cl = clone --recursive
sw = switch --recurse-submodules
st = status --short
tree = log --graph --oneline --all --decorate --abbrev-commit
delete-merged-branches = !git branch --merged | egrep -v '^\\*| master$| main$' | ifne vipe | ifne xargs -n1 git branch -d
l = log --oneline -10
co = !git rev-parse --verify $1 && git stash && git checkout --recurse-submodules $1 && git stash pop && :
ours = "!f() { git checkout --ours -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
theirs = "!f() { git checkout --theirs -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
loggrep = "!git log -S \"$1\" --patch --format=\"commit %C(yellow)%h%Creset %s\" --color=always | egrep \"^commit |^(\\e\\[3.m)?[+-].*$1\" | sed \"s/^commit //\" | less #"
examine-since = "!git log \"$1\"..HEAD --reverse --patch"
forcepush = push --force-with-lease
remaster = !printf \"remastering from %s...\" $(git rev-parse --short HEAD) && git fetch origin && git rebase --quiet origin/master && printf \" Done: %s\n\" $(git rev-parse --short HEAD)
recheckout = "!f() { ref=${1:-$(git rev-parse --abbrev-ref HEAD)} && rref=$(git rev-parse --abbrev-ref --symbolic-full-name $ref@{upstream}) && a=$(git rev-parse --short $ref) && git fetch --quiet $(echo $rref | sed 's_/.*__') 2>/dev/null && b=$(git rev-parse --short $rref) && ([ \"$a\" = \"$b\" ] && echo \"$ref already at $b\" || (git stash push -m \"before recheckout $a -> $b\" && git checkout --quiet -B $ref --track $rref && echo \"$ref reset: $a -> $b\")); }; f"
[fetch]
prune = true
[pull]
rebase = true
[push]
default = current
followTags = true
[rebase]
autoSquash = true
missingCommitsCheck = warn
stat = true
[merge]
tool = nvimdiff
ff = only
[mergetool]
keepBackup = false
[mergetool "nvimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED
[sendemail]
from = "Hannu Hartikainen <[email protected]>"
smtpServer = /usr/bin/msmtp
annotate = yes
[sendemail.linux]
tocmd ="./scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol"
cccmd ="./scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom"
[include]
path = .gitconfig-local
[delta]
navigate = true
minus-style = normal "#500001"
minus-non-emph-style = normal "#500001"
minus-emph-style = normal "#901011"
minus-empty-line-marker-style = normal "#500001"
plus-style = syntax "#004000"
plus-non-emph-style = syntax "#004000"
plus-emph-style = syntax "#008000"
plus-empty-line-marker-style = normal "#004000"