-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
98 lines (87 loc) · 2.82 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
[user]
email = [email protected]
name = Josh Klar
signingkey = [email protected]
[color]
pager = yes
[core]
pager = bat --style=plain
[commit]
gpgsign = true
verbose = true
[alias]
# I constantly type "checkout" as "cechkout" or something otherwise
# ridiculous and have to fix it with https://github.com/nvbn/thefuck, so
# let's just make an easier alias
co = checkout
# These yanked straight outta https://hackernoon.com/lesser-known-git-commands-151a1918a60#.47hyswh0f
please = push --force-with-lease
shorty = status --short --branch
# http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html#comment-247215295
ignore = !git update-index --assume-unchanged
unignore = !git update-index --no-assume-unchanged
ignored = !git ls-files -v | grep ^[a-z]
# https://bluz71.github.io/2018/11/26/fuzzy-finding-in-bash-with-fzf.html
ll = "log --graph --format=\"%C(yellow)%h%C(red)%d%C(reset) - %C(bold green)(%ar)%C(reset) %s %C(blue)<%an>%C(reset)\""
# from a coworker at TWG
jiggle-ci = commit --allow-empty -m 'forcibly update anything that runs on post-commit hooks'
# And now either my own stuff, or stuff I adopted from sources I've long since forgotten
lol = log --format='%Cred%h%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset%C(yellow)%d%Creset' --no-merges
# "cram" a file into the last commit. This is my "oh shit, forgot a migration" button
cram = commit --amend --no-edit
dlog = log -p --ext-diff
dshow = show --ext-diff
mainup = !git co main && git pull
masterup = !git co master & git pull
[fetch]
prune = true
prunetags = true
[rerere]
enabled = 1
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[push]
default = current
[gpg]
program = /home/j/bin/gpg
[url "[email protected]:"]
insteadOf = https://gitlab.com/
[url "[email protected]:"]
insteadOf = https://github.com/
[init]
defaultBranch = main
# The https://jvns.ca/blog/2024/02/16/popular-git-config-options/ section
[rebase]
# I've been passing --autosquash for so many years by hand... ffs
autosquash = true
[help]
autocorrect = prompt
[diff]
algorithm = histogram
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckobjects = true
[push]
followtags = true
[log]
date = iso
# Far better diffing for languages it understands
[diff]
external = difft
[include]
# NEVER check this file into Git as it will leak the paths of
# anywhere that is being trusted despite "dubious ownership", as
# discussed in
# https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
# and worked around with my "git-remotesafe" script (see /bin in
# dotfiles), somewhat cribbed from
# https://weblog.west-wind.com/posts/2023/Jan/05/Fix-that-damn-Git-Unsafe-Repository.
path = ~/.gitconfig.remotesafe
[includeIf "gitdir:~/src/work/"]
path = ~/src/work/.gitconfig