-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
73 lines (71 loc) · 3.22 KB
/
.gitconfig
File metadata and controls
73 lines (71 loc) · 3.22 KB
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
[core]
pager = less -FX
quotePath = false
[commit]
template = ~/.git_commit_msg
[merge]
ff = false
[pull]
ff = only
[fetch]
prune = true
[push]
default = simple
[pager]
log = diff-highlight | less -FX
reflog = diff-highlight | less -FX
show = diff-highlight | less -FX
diff = diff-highlight | less -FX
tag = diff-highlight | less -FX
[alias]
alias = config --get-regexp 'alias.*'
me = config --get-regexp 'user.*'
lme = config --local --get-regexp 'user.*'
st = status
sta = status -uall
co = checkout
sw = switch
base = "!f() { git sw main && git pull; };f"
work = switch -c
feature = "!f() { git switch -c $1 && git push -u origin $1; };f"
unstage = restore --staged
cm = commit
logtips = log --decorate --date=local --pretty='format:%C(yellow)%h %C(green)%cd %C(cyan)%an%C(red)%d %C(reset)%s' -16
lgt = log --decorate --date=local --pretty='format:%C(yellow)%h %C(green)%cd %C(cyan)%an%C(red)%d %C(reset)%s' -10
lgtopo = log --decorate --date=local --topo-order --pretty='format:%C(yellow)%h %C(green)%cd %C(cyan)%an%C(red)%d %C(reset)%s' -10
slog = log --no-merges --date=local --pretty='format:%C(yellow)%h %C(green)%cd %C(cyan)%an%C(red)%d %C(reset)%s' -10
lghere = log --first-parent --decorate --date=local --pretty='format:%C(yellow)%h %C(green)%cd %C(cyan)%an%C(red)%d %C(reset)%s' -10
rb = rebase
rbi = rebase -i
br = branch
bra = branch -a
br-clear = "!f() { git branch -d $1; git push origin :$1; };f"
mg-revert = revert -m 1
df-isc = diff --ignore-space-change
df-files = diff-tree --no-commit-id --name-only -r
ranking = "!f() { git shortlog -sn --no-merges --after='date +%Y/%m/01' --before='date +%Y/%m/%d' | cat -n; }; f"
mile-to-main = "!f() { git fetch; git rev-list --no-merges --count ..origin/main; }; f"
mile-to-master = "!f() { git fetch; git rev-list --no-merges --count ..origin/master; }; f"
mile-to-dev = "!f() { git fetch; git rev-list --no-merges --count ..origin/develop; }; f"
pushf = push --force-with-lease
clear-feature = "!f() { git branch | grep feature | xargs git branch -d; }; f"
show-merged = "!f() { git branch --merged | egrep -v \"\\*|main|master|dev|develop\"; }; f"
clear-merged = "!f() { git branch --merged | egrep -v \"\\*|main|master|dev|develop\" | xargs git branch -d; }; f"
tag-grep-newer = "!f() { git tag -l \"$1*\" | sort -Vr; }; f"
tag-grep-current = "!f() { git tag -l \"$1*\" | sort -Vr | head -n 3; }; f"
[include]
; local setting
; - ex1: set user's name and email
; - ex2: override aliases or other settings
path = ~/.local.gitconfig
[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 = private_key
patterns = private_key_id
[init]
defaultBranch = main