-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgitconfig
More file actions
134 lines (106 loc) · 3.52 KB
/
gitconfig
File metadata and controls
134 lines (106 loc) · 3.52 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[user]
name = Josh Priddle
email = jpriddle@me.com
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF4LsgFuqYLjfCqCd73SuOoK358dlTzg2W0BuT2qdnm5
[color]
ui = auto
[color "status"]
header = yellow bold
added = green bold
updated = green reverse
changed = magenta bold
untracked = red
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[branch]
sort = -authordate
[push]
default = current
[fetch]
prune = true
[merge]
ff = only
tool = fugitive
[pull]
rebase = true
[commit]
cleanup = scissors
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[format]
pretty = format:%C(red)%h%Creset%C(yellow)%d%Creset %C(magenta)%an%Creset: %s %C(green)(%ar)%Creset
[alias]
amend = !git commit --amend --date=\"$(date)\" -C HEAD
branch-name = rev-parse --abbrev-ref HEAD
copy-last-sha = !git last-sha | tr -d '\n' | pbcopy
last-sha = rev-parse --short HEAD
lg = log --graph --abbrev-commit --date=relative
msg = commit --allow-empty -m
pa = add --patch
pending = !git --no-pager log @{u}.. && echo
undo = reset --soft HEAD^
unstage = reset HEAD --
prune-branches = !git branch --merged | grep -E -v '^(master|main)$' | grep -v "\\\\*" | xargs -n 1 git branch -d
fixup = "!f() { git commit $* --fixup HEAD; }; f"
browse = "!f() { if command -v git-browse >/dev/null; then git-browse \"$@\"; else gh browse \"$@\" > /dev/null; fi }; f"
pulls = browse -- pulls
root = rev-parse --show-toplevel
strip-whitepsace = !git ls-files | xargs perl -i -pe 's/[\\t ]+$//g'
showf = show --format=fuller
stats = !lcars util:git:stats
prq = !gh prq --push --copy --open --body ''
prql = !gh prq --no-editor --push --copy --open --body \"\" --title \"$(git log -1 --format=%s)\"
pru = !gh pr view --json url --jq .url
prb = "!f() { gh pr view --web \"$@\" 2> /dev/null || gh browse &> /dev/null; }; f"
todo = grep -wniI -e TODO -e FIXME
last-committer = !git --no-pager log --pretty="%an" --no-merges -1
last-subject = !git --no-pager log --pretty="%s" -1
show-files = !git --no-pager show --name-only --format=
last-pull-sha = !"git reflog | awk '/: pull / { if (l == 1) { print $1; exit }; l+=1 }'"
first-commit = commit --allow-empty -m 'First commit'
ls-files-tree = "!f() { git ls-files \"$@\" | tree --fromfile . ; }; f"
default-branch = !gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
check-signature = "!f() { [ \"$(git log -1 --format='%G?' \"$@\")\" = G ] && echo good || echo bad; }; f"
[advice]
statusHints = false
[rebase]
autosquash = true
autostash = true
[stash]
showStat = true
showPatch = true
[status]
short = true
branch = true
[include]
path = ~/.gitconfig.local
[init]
defaultBranch = main
[mergetool "fugitive"]
cmd = vim -f -c \"Gdiff\" \"$MERGED\"
[instaweb]
httpd = webrick
browser = open
[man]
viewer = vim
[man "vim"]
cmd = "f() { [ -t 1 ] && MANPAGER=\"vim +MANPAGER --not-a-term -\" man \"$@\" || man \"$@\"; }; f"
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = ~/.ssh/allowed_signers
[commit]
gpgsign = true
[tag]
gpgsign = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
; vim:ft=gitconfig list