-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
57 lines (47 loc) · 2.24 KB
/
.gitconfig
File metadata and controls
57 lines (47 loc) · 2.24 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
[user]
name = Ryo Yoneyama (@yulii)
email = yone.info@gmail.com
[push]
default = matching
[core]
editor = /usr/bin/vim
[include]
path = .gitconfig.secret
[alias]
alias = "!git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort"
st = status --short --branch
co = checkout
pr = pull --rebase
network = log --graph --date=short --format='%C(yellow)%h%C(reset) %C(magenta)[%ad]%C(reset)%C(auto)%d%C(reset) %s %C(cyan)@%an%C(reset)'
# Commit
wip = commit --allow-empty -m '[ci skip] wip commit'
issue-ref = "!f(){ git symbolic-ref HEAD | grep issue | sed -E 's/^.*issues\\/([0-9]+).*$/#\\1/g'; }; f"
ci = "!f(){ if [ $# -ge 2 ]; then git commit $1 \"$2 $(git issue-ref)\" ; else echo 'requires a comment!' ; fi ; } ; f"
# Branch
current-branch = symbolic-ref --short HEAD
base-branch = !git config "branch.$(git current-branch).base"
checkout-work-branch = "!f(){ cb=$(git current-branch) && git co -b \"wip/${1}\" && git base-branch \"${cb}\"; }; f"
rebase-work-branch = "!f(){ cb=$(git current-branch) && git fetch && git checkout -b $(git current-branch | sed 's/^wip\\///') $(git base-branch) && git merge --squash ${cb}; }; f"
# Cancel
cancel-add = reset HEAD
cancel-commit = reset --soft HEAD^
# Clean branches
frozen-branch = "!f(){ echo 'main'; }; f"
clean-branches = "!f(){ git branch --merged | grep -v '^*' | grep -v $(git frozen-branch) | xargs git branch -d; git fetch --prune; }; f"
clean-files = clean -fd
# GitHub
view = config --get remote.origin.url
[filter "ignore-secret-npm"]
smudge = "cat"
clean = "sed '/^\\/\\/registry\\.npmjs\\.org\\/:_authToken=/d'"
[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
[pull]
rebase = true