-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgitconfig
91 lines (91 loc) · 3.17 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[user]
name = Koen Punt
email = koen@koenpunt.nl
signingkey = 3BD9164122E5B50F
[color]
diff = auto
status = auto
branch = auto
[core]
excludesfile = ~/.gitignore_global
autocrlf = input
editor = /opt/homebrew/bin/vim
attributesfile = ~/.gitattributes_global
[alias]
ci = commit
b = branch --sort=-committerdate
br = branch
bc = branch-cleanup
r = remote
s = status
f = fetch
co = checkout
cp = cherry-pick
main-branch = !git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4
com = "!f(){ git checkout $(git main-branch) $@;}; f"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lg2 = log --format='%Cgreen%h%Creset %C(cyan)%an%Creset - %s' --graph
today = !git log --since=midnight --author=\"$(git config user.name)\" --oneline
branch-cleanup = !git fetch origin --prune && git branch --merged main | grep -v 'main$' | xargs git branch -d
whatadded = log --diff-filter=A
undo = reset HEAD^
ignored = ls-files --other --ignored --exclude-standard
quote-string = "!read -r l; printf \\\"!; printf %s \"$l\" | sed 's/\\([\\\"]\\)/\\\\\\1/g'; printf \" #\\\"\\n\" #"
debug = "!set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git"
list-autostash = "!git log --pretty='%cr: %h %s' $(git fsck --no-reflog | grep '^dangling commit' | cut -f3 -d\" \" ) | grep ': autostash$'"
tod = "!git log --author=\"$(git config user.name)\" --date=iso | perl -nalE 'if (/^Date:\\s+[\\d-]{10}\\s(\\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf \"%02d - %4d %s\", $_, $h{$_}, \"*\"x ($h{$_} / $m * 50); }'"
[push]
default = current
[rerere]
enabled = true
[pull]
rebase = true
default = current
[help]
autocorrect = 5
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[diff "exif"]
textconv = exiftool
[diff "compressedjson"]
textconv = jq .
[diff "sketchtool"]
textconv = "sketchtool dump"
cachetextconv = true
binary = true
[rebase]
autosquash = true
autoStash = true
[url "https://github.com"]
insteadOf = git://github.com
[hub]
protocol = https
[commit]
gpgsign = true
[merge "arschema"]
name = newer ActiveRecord schema version
driver = "ruby -e '\n\
system %(git), %(merge-file), %(--marker-size=%L), %(%A), %(%O), %(%B)\n\
b = File.read(%(%A))\n\
b.sub!(/^<+ .*\\nActiveRecord::Schema\\.define.:version => (\\d+). do\\n=+\\nActiveRecord::Schema\\.define.:version => (\\d+). do\\n>+ .*/) do\n\
%(ActiveRecord::Schema.define(:version => #{[$1, $2].max}) do)\n\
end\n\
File.open(%(%A), %(w)) {|f| f.write(b)}\n\
exit 1 if b.include?(%(<)*%L)'"
[gpg]
program = gpg
[init]
defaultBranch = main
[credential]
helper = /usr/local/share/gcm-core/git-credential-manager