-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
222 lines (193 loc) · 6.59 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
[user]
name = Patrick Godschalk
email = [email protected]
signingkey = 07B1A68011CA609C8AB0F67C4E6C0EAA175F13A2
[core]
hideDotFiles = dotGitOnly
# Prevent showing files whose names contain non-ASCII symbols as unversioned.
# http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
precomposeunicode = false
# Make `git rebase` safer on macOS.
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
# Speed up commands involving untracked files such as `git status`.
# https://git-scm.com/docs/git-update-index#_untracked_cache
untrackedCache = true
# Use custom `.gitignore`.
excludesfile = ~/.gitignore_global
# Use custom `.gitattributes`
attributesfile = ~/.gitattributes
editor = nano
pager = diff-so-fancy | less --tabs=4 -RFX
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning
# of a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
[alias]
aa = add --all
amend = commit --amend --reuse-message=HEAD
ci = commit --verbose
co = checkout
dc = diff --find-copies-harder --cached
dh1 = diff HEAD~1
di = diff --find-copies-harder
ds = diff --stat=160,120
fa = fetch --all
ff = merge --ff-only
noff = merge --no-ff
po = "!git branch --show-current | xargs -n 1 git push --set-upstream origin"
pom = push origin main
poms = push origin master
st = status
# Divergence (commits we added and commits remote added)
div = divergence
# Goodness (summary of diff lines added/removed/total)
gn = goodness
gnc = goodness --cached
# Fancy logging.
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
# b = all branches
# bs = all branches, sorted by last commit date
b = "!. ~/Code/bin/githelpers && pretty_git_branch"
bs = "!. ~/Code/bin/githelpers && pretty_git_branch_sorted"
cp = cherry-pick
h = !git head
head = !git r -1
hp = "!. ~/Code/bin/githelpers && show_git_head"
l = "!. ~/Code/bin/githelpers && pretty_git_log"
la = !git l --all
pf = push --force-with-lease
r = !GIT_NO_PAGER=1 git l -30
ra = !git r --all
ski = !git stash --keep-index
# Clone a repository including all submodules
c = clone --recursive
# Commit all changes
ca = !git add --all && git commit --all --verbose
# List contributors with number of commits
contributors = shortlog --summary --numbered
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" --reuse-message=HEAD; }; f"
# Remove branches that have already been merged with master
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep --invert-match '\\*' | xargs --max-args=1 git branch --delete"
# Find branches containing commit
fb = "!f() { git branch --all --contains $1; }; f"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
# Find tags containing commit
ft = "!f() { git describe --always --contains $1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# Switch to a branch, creating it if necessary
go = "!f() { git checkout -b \"$1\" 2>/dev/null || git checkout \"$1\"; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase --interactive HEAD~$1; }; r"
# Remove the old tag with this name and tag the latest commit with it.
retag = "!r() { git tag --delete $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# View the current working tree status using the short format
s = status --short
# Pull in remote changes for the current repository and all its submodules
p = pull --recurse-submodules
# Show verbose output about tags, branches or remotes
tags = tag --list
branches = branch --all
remotes = remote --verbose
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[branch]
# Show most recently changed branches first.
sort = -committerdate
[checkout]
workers = 4
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff-highlight"]
oldNormal = red
oldHighlight = red "#500000"
newNormal = green
newHighlight = green "#003000"
[color "diff"]
meta = 11
frag = magenta bold # line info
commit = yellow bold
old = red # deletions
new = green # additions
whitespace = "#ffff00" reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[commit]
# https://help.github.com/articles/signing-commits-using-gpg/
gpgsign = true
[diff "bin"]
# Use `hexdump` to diff binary files
textconv = hexdump -v -C
[diff-so-fancy]
# Detect copies as well as renames.
renames = copies
markEmptyLines = false
stripLeadingSymbols = false
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[help]
# Automatically correct and execute mistyped commands.
autocorrect = 1
[init]
defaultBranch = main
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[pull]
rebase = false
[push]
autoSetupRemote = true
# https://git-scm.com/docs/git-config#git-config-pushdefault
default = simple
# Make `git push` push relevant annotated tags when pushing branches out
followTags = true
[tag]
forceSignAnnotated = true
gpgsign = true
# URL shorthands
[url "[email protected]:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "https://github.com/"
[url "https://github.com/"]
insteadOf = "github:"
[url "[email protected]:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "https://gist.github.com/"
[url "https://gist.github.com/"]
insteadOf = "gist:"
[url "[email protected]:"]
insteadOf = "gl:"
pushInsteadOf = "gitlab:"
pushInsteadOf = "https://gitlab.com/"
[url "https://gitlab.com/"]
insteadOf = "gitlab:"
[gitbutler]
aiOpenAIKeyOption = bringYourOwn
aiOpenAIModelName = gpt-4o-mini
aiModelProvider = openai
[advice]
addIgnoredFile = false