-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig
130 lines (114 loc) · 4.28 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
[user]
name = Greg Weber
email = [email protected]
# email = [email protected]
[includeIf "hasconfig:remote.*.url:[email protected]:digitalmint/**"]
path = .gitconfig-digitalmint
[includeIf "hasconfig:remote.*.url:[email protected]:digitalmint/**"]
path = .gitconfig-digitalmint
[url "ssh://[email protected]/"]
insteadOf = https://gitlab.com/
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
#[url "[email protected]:"]
# insteadOf = https://github.com/
# There are more things to configure to use delta
# https://github.com/dandavison/delta#get-started
[core]
pager = delta
[delta]
navigate = true # use n and N to move between diff sections
[core]
pager = delta --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dark-mode || echo light-mode)"
[delta "light-mode"]
light = true
# syntax-theme = GitHub
[delta "dark-mode"]
light = false
# syntax-theme = Visual Studio Dark+
[interactive]
diffFilter = delta --color-only --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dark-mode || echo light-mode)"
[add.interactive]
useBuiltin = false # required for git 2.37.0
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[color]
ui = true
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore_global
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
up = !git remote update -p && git merge --ff-only @{u}
# View the SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph
# Pull in remote changes for the current repository and all its submodules
pall = !"git pull; git submodule foreach git pull origin master"
# Commit all changes
ca = commit -a
# Undo a `git push`
undopush = push -f origin HEAD^:master
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# these don't show the author though
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --all
master-rebase = "!f() { git checkout master && git pull && git checkout $1 && git rebase master; }; f"
master-rebasei = "!f() { git checkout master && git pull && git checkout $1 && git rebase -i master; }; f"
supermerge = "!f() { git master-rebase $1 && git push -f origin $1 && git checkout master && git merge $1 --ff-only && git push origin master && git push origin :$1 && git branch -d $1 && echo 'supermerged!'; };f"
supermergei = "!f() { git master-rebasei $1 && git checkout master && git merge $1 --ff-only && git pushorigin master && git push origin :$1 && git branch -d $1 && echo 'supermerged!'; }; f"
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
# Use `origin` as the default remote on the `master` branch in all cases
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "main"]
remote = origin
merge = refs/heads/main
# URL shorthands
[url "[email protected]:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "[email protected]:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[secrets]
providers = git secrets --aws-provider
patterns = (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}
patterns = (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\\s*(:|=>|=)\\s*(\"|')?[A-Za-z0-9/\\+=]{40}(\"|')?
patterns = (\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')?
allowed = AKIAIOSFODNN7EXAMPLE
allowed = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
[init]
templateDir = ~/.git-templates/git-secrets
defaultBranch = main
[gpg]
program = /opt/homebrew/bin/gpg
#[diff]
# external = difft