-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig
156 lines (156 loc) · 4.81 KB
/
dot_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
154
155
156
[advice]
skippedCherryPicks = false
[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
absorb = absorb --and-rebase
fixup = commit --fixup
fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"
squash = commit --squash
ri = rebase --interactive
br = branch
open = browse
pruneremote = remote prune origin
gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"
root = rev-parse --show-toplevel
brancherry = "!f() { git checkout -b $(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short \"$1\") $1; }; f"
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
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
p = pull
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]++'"
clone-for-worktrees = "!sh $HOME/bin/git-clone-bare-for-worktrees.sh"
[branch]
autoSetupMerge = always
autoSetupRebase = always
sort = -committerdate
[color]
ui = true
[core]
editor = nvim
whitespace = warn
excludesFile = ~/.gitignore
pager = delta
ignorecase = true
fsmonitor = true
[diff]
algorithm = histogram
compactionHeuristic = true
colorMoved = default
colorMovedWS = "allow-indentation-change"
context = 10
tool = nvimdiff
[difftool]
prompt = false
[delta]
minus-style = syntax "#37222c"
minus-non-emph-style = syntax "#37222c"
minus-emph-style = syntax "#713137"
minus-empty-line-marker-style = syntax "#37222c"
line-numbers-minus-style = "#b2555b"
plus-style = syntax "#20303b"
plus-non-emph-style = syntax "#20303b"
plus-emph-style = syntax "#2c5a66"
plus-empty-line-marker-style = syntax "#20303b"
line-numbers-plus-style = "#266d6a"
line-numbers-zero-style = "#3b4261"
navigate = true # use n and N to move between diff sections
light = false # set to true w/ a terminal light background
line-numbers = true
[fetch]
prune = true
; pruneTags = true
[help]
autoCorrect = prompt
[init]
defaultBranch = main
[interactive]
singlekey = true
diffFilter = delta --color-only
[log]
date = iso
[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]
followTags = true
default = current
[rebase]
autosquash = true
autostash = true
updateRefs = true
[rerere]
enabled = true
autoupdate = true
[include]
path = ~/.gitconfig.local
[includeIf "gitdir:~/code/COMPANY/"]
path = ~/.gitconfig.work
[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
[worktree]
guessRemote = true
[url "git@github.com:"]
insteadOf = "https://github.com/"
[tag]
sort = taggerdate
[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