-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
110 lines (106 loc) · 4 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
[user]
name = Hugo Marcotte
email = marcotte.hugo@gmail.com
[core]
excludesfile = /Users/hugo.marcotte/.gitignore
[push]
default = simple
[rerere]
enabled = true
[rebase]
autosquash = true
[alias]
unstage = reset HEAD --
uncommit = reset --soft HEAD^
df = diff --word-diff --color-words
sla = log --oneline --decorate --graph --all -20
browse = !hub browse
compare = !hub compare
tracked = ls-tree -r master --name-only
cleanmergedbranch = !git checkout master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d
# brew install fzf
cob = !git checkout `(git branch | fzf)`
# Which files are receiving the most "love"
churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
# Show all of my configured aliases
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
# Thin out older metadata within the repository, reduceses filesystem footprint
trim = !git reflog expire --expire=now --all && git gc --prune=now
[pull]
rebase = true
[color]
ui = true
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = red
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[merge]
ff = only
[fetch]
prune = true
[help]
autocorrect = 1
[url "git@github.com:"]
insteadOf = /~https://github.com/
[init]
templateDir = /Users/hugo.marcotte/.git-templates
defaultBranch = main
[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
patterns = xox[p|b|a]-[0-9]{10,12}-[0-9]{10,12}-[0-9]{10,12}-[a-z0-9]{30,35}
patterns = xox[b|p|a]-[0-9]{10,12}-[a-z0-9]{24,35}
patterns = BEGIN\\s+RSA\\s+PRIVATE\\s+KEY
patterns = BEGIN\\s+OPENSSH\\s+PRIVATE\\s+KEY
patterns = BEGIN\\s+DSA\\s+PRIVATE\\s+KEY
patterns = BEGIN\\s+PGP\\s+PRIVATE\\s+KEY\\s+BLOCK
patterns = BEGIN\\s+EC\\s+PRIVATE\\s+KEY-----
patterns = facebook.*[=|:]\\s*['|\"][0-9a-f]{32}['|\"]
patterns = twitter.*[=|:]\\s*['|\"][0-9a-z]{35,44}['|\"]
patterns = github.*[=|:]\\s*['|\"][0-9a-z]{36,41}['|\"]
patterns = client[_|-]?secret.*[=|:]\\s*['|\"][a-z0-9_-]{24}['|\"]
patterns = heroku.*[=|:]\\s*['|\"][0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}['|\"]
patterns = api[_|-]?key.*[=|:]\\s*['|\"][0-9a-z]{32,45}['|\"]
patterns = secret.*[=|:]\\s*['|\"][0-9a-z]{32,45}['|\"]
patterns = https://hooks.slack.com/services/T[a-z0-9_]{8}/B[a-z0-9_]{8}/[a-z0-9_]{24}
patterns = \"type\"\\s*:\\s*\"service_account\"
patterns = SK[a-z0-9]{32}
patterns = [a-f0-9]{32}[-][0-9]{1,2}
patterns = A[K|S]IA[0-9A-Z]{16}
patterns = amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
patterns = AIza[0-9a-z\\-_]{35}
patterns = [0-9]+-[0-9a-z_]{32}\\.apps\\.googleusercontent\\.com
patterns = ya29\\.[0-9a-z\\-_]+
patterns = [0-9a-f]{32}-us[0-9]{1,2}
patterns = key-[0-9a-z]{32}
patterns = [a-z]{3,10}://[^$%]{1}[^\\/:@]{3,20}:[^$%]{1}[^\\/:@]{3,20}@.{1,100}
allowed = vendor/*
allowed = user[0-9]*:pass[word]*[0-9]*@
[commit]
template = /Users/hugo/.stCommitMsg
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[blame]
ignoreRevsFile = .git-blame-ignore-revs