This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
153 lines (153 loc) · 4.18 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[alias]
aa = add -A .
b = branch
st = status
ci = commit
co = checkout
cob = "!f() { git checkout $(git show-ref --verify --quiet refs/heads/\"$1\" || echo '-b') \"$1\"; }; f"
cp = cherry-pick
put = push origin HEAD
fixup = commit --fixup
squash = commit --squash
ri = rebase --interactive
br = branch
open = browse
pruneremote = remote prune origin
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --graph
ll = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --first-parent --no-merges
add-untracked = !"git status --porcelain | awk '/\\?\\?/{ print $2 }' | xargs git add"
reset-authors = commit --amend --reset-author -CHEAD
rmbranch = !"git branch -d $(git branch --merged)"
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
pushf = push --force-with-lease
pushforeal = push --force
append = commit --amend -C HEAD
amend = commit --amend
pnb = push -u origin HEAD
lart = for-each-ref --sort=committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color: cyan)%(refname:short)'
sha = rev-parse HEAD
releases = for-each-ref --sort=authordate --format=\"%(color:white)%(color:bold)%(refname:lstrip=-2)%09%(color:blue)%(authordate:relative)%09%(color:red)%(authorname)\" refs/remotes/origin/release
conflicted = !nvim +Conflicted
quickdiff = diff ':!package-lock.json'
diffs = diff --staged
last = log -1 HEAD --stat
cm = commit -m
rv = remote -v
d = diff
se = !git rev-list --all | xargs git grep -F
up = pull --rebase origin
recent-branches = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
recent-local-branches = !"git reflog | grep 'checkout:' | head | awk '{print $8}' | awk '!x[$0]++'"
[branch]
autoSetupMerge = always
autoSetupRebase = always
[color]
ui = true
[color "branch"]
current = green
local = normal
remote = red
plain = normal
[color "status"]
branch = green
header = normal dim
added = red
updated = blue
changed = red
untracked = yellow
nobranch = red
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[core]
editor = nvim
whitespace = warn
excludesFile = ~/.gitignore
pager = delta
ignorecase = true
[diff]
algorithm = patience
compactionHeuristic = true
colorMoved = default
tool = vimdiff
[delta]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
hunk-header-decoration-style = yellow box
line-numbers = true
; minus-color = normal "#340001"
; plus-color = syntax "#012800"
whitespace-error-style = 22 reverse
[fetch]
prune = true
; pruneTags = true ; my workplace is being dumb with tags
[help]
autoCorrect = prompt
[include]
path = ~/.gitconfig.local
[init]
defaultBranch = main
[interactive]
singlekey = true
diffFilter = delta --color-only
[merge]
conflictstyle = zdiff3
summary = true
tool = diffconflicts
[merge "bundlelock"]
name = lock Gemfile
driver = bundle install
[merge "bundle"]
name = bundle
driver = bundle
[pull]
rebase = true
[push]
default = simple
followTags = true
[rebase]
autosquash = true
autostash = true
[rerere]
enabled = true
autoupdate = true
[user]
useconfigonly = true
name = Tim Tyrrell
email = [email protected]
[web]
browser = chromium
[commit]
verbose = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[checkout]
defaultRemote = origin
[gpg]
format = ssh
[gpg "ssh"]
defaultKeyCommand = ssh-add -L
[blame]
markUnblamableLines = true
markIgnoredLines = true
[mergetool]
keepBackup = false
[mergetool "fugitive"]
cmd = nvim -c \"Git\" \"mergetool\"
[mergetool "diffconflicts"]
cmd = nvim -c DiffConflicts \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
[mergetool "vimdiff1"]
hideResolved = true