-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_gitconfig.tmpl
39 lines (39 loc) · 1.57 KB
/
dot_gitconfig.tmpl
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
[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
[ghq]
root = ~/projects
[alias]
tree = log --graph --all --format=\"%x09%C(cyan bold)%an%Creset%x09%C(yellow)%h%Creset %C(magenta reverse)%d%Creset %s\"
delete-merged-branch = "!f () { git checkout $1; git branch --merged|egrep -v '\\*|main'|xargs git branch -d; };f"
co = checkout
br = branch
st = status
pull-o = "!f(){ \
local branch_name=${1};\
local current_branch=$(git symbolic-ref --short HEAD);\
local branch_remote=$(git config branch.${branch_name}.remote);\
local branch_path=$(git config branch.${branch_name}.merge);\
if [ ${branch_name} = ${current_branch} ];then \
git pull ${branch_remote} ${branch_name} --ff-only;\
return ${?};\
else \
git fetch ${branch_remote} && \
git fetch . refs/remotes/${branch_remote}/${branch_name}:${branch_path};\
return ${?};\
fi;\
};f"
[include]
path = ~/.gitconfig_user
[rerere]
enabled = true
[core]
ignorecase = true
[push]
default = current
[fetch]
prune = true