forked from HariSekhon/DevOps-Bash-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
188 lines (153 loc) · 5.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
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
#
# Author: Hari Sekhon
# Date: 2012-01-31 14:08:42 +0000 (Tue, 31 Jan 2012)
#
# configure your user name and email in ~/.gitconfig.local
#[user]
# name = Hari Sekhon
# email = [email protected]
[include]
path = .gitconfig.local
[core]
# detects filemode changes
filemode = true
# defaults to $VISUAL or $EDITOR which is set in .bash.d/env.sh
#editor = vim
# global .gitignore
excludesfile = ~/.gitignore
#whitespace = trailing-space,space-before-tab
[push]
# default = current
default = simple
[alias]
br = branch
co = checkout
ci = commit
p = push
st = status
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
unstage = reset HEAD --
last = log -1 HEAD
# how to use commands inside git aliases
visual = !gitk
df = diff
dc = diff --cached
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
# Show files ignored by git:
ign = ls-files -o -i --exclude-standard
# avoid diff-so-fancy so we can create patches
patch = !git --no-pager diff --no-color
[help]
# autocorrects git commands and executes the inferred command
# dangerous this just autocorrected my git rename to git rebase, lucky it errored out...
autocorrect = 0
# ============================================================================ #
# G i t C o l o r
# ============================================================================ #
# colors: normal, black, red, green, yellow, blue, magenta, cyan, white
# effects: bold, dim, ul, blink and reverse
# if 2 colours given - 1st is foreground, 2nd is background
[color]
ui = auto
diff = auto
grep = auto
# do not set always here, use:
# -c color.status=always
# for specific overrides, otherwise may break gitci and related functions
status = auto
branch = auto
[color "branch"]
current = green ul
local = yellow
remote = red # default
plain = white
[color "diff"]
new = green
old = red # default
plain = white
whitespace = yellow reverse
func = yellow
#frag = cyan # default
#meta = green bold # default
# from diff-so-fancy
meta = 11
frag = magenta bold
[color "grep"]
context = white
filename = cyan
function = yellow
linenumber = green
match = red
selected = yellow
separator = white
[color "status"]
added = magenta
changed = red
untracked = cyan
branch = magenta blink
nobranch = red blink
# diff-so-fancy but I prefer most of my old preferences
#[color "diff"]
# meta = 11
# frag = magenta bold
# commit = yellow bold
# old = red bold
# new = green bold
# whitespace = red reverse
# ============================================================================ #
# D i f f - s o - f a n c y
# ============================================================================ #
# detected if installed and set via $GIT_PAGER in .bash.d/git.sh
#[core]
# pager = diff-so-fancy | less --tabs=4 -RFX
#[pager]
# don't set --pattern, overrides -F and doesn't quit less automatically for short diffs
#diff = diff-so-fancy | less --tabs=4 -RFX --pattern '^(Date|added|deleted|modified): '
#diff = diff-so-fancy | less --tabs=4 -RFX
# truncate lines in less, only for 'git blame'
#blame = less -S
[color "diff-highlight"]
#oldNormal = red bold
#oldHighlight = red bold 52
oldHighlight = normal red
#newNormal = green bold
#newNormal = green bold
newHighlight = normal green
[diff-so-fancy]
stripLeadingSymbols = false
# ============================================================================ #
#[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 "media"]
# clean = git media clean %f
# smudge = git media smudge %f
# required = true
# ============================================================================ #
# A W S S e c r e t s
# ============================================================================ #
# AWS Secrets prevents committing secrets in to Git
# install git-secrets hooks in any repo initialized or cloned to prevent credential leak
[init]
templateDir = ~/.git-templates/git-secrets
[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}(\"|')?
# doesn't work, doesn't support (?! ) negative lookahead regex
#patterns = (\bhari|sekhon\b)(!.*@gmail.com)
# only applies to contents, not metadata to prevent wrong author commits
#patterns = hari|sekhon
allowed = AKIAIOSFODNN7EXAMPLE
allowed = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY