This repository has been archived by the owner on Sep 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
160 lines (113 loc) · 3.82 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
# Git Configuration
# See: http://michaelwales.com/articles/make-gitconfig-work-for-you/
# Git Helpers
[alias]
# Git add and commit - all in one step
ac = "!f() { git add .; git cm \"$@\"; }; f"
# Add new git remote
ar = "!f() { git remote add \"$0\" \"$1\"; }; f"
# Execute git branch command
b = "!f() { git branch $@; }; f"
# Delete branch locally
bdel= "!f() { git b -D $@; }; f"
# Delete branch remotely
bdelr= "!f() { git push origin --no-verify --delete $@; }; f"
# Rename branch
bren= "!f() { git b -m $@; git puo $@; }; f"
# Checkout branch
ch = "!f() { git checkout $@; }; f"
# Checkout and push new branch to origin
chb = "!f() { git ch -b \"$@\"; git puo \"$@\"; }; f"
# Checkout branch and pull latest version
chp = "!f() { git ch $@; git pull; }; f"
# Commit with message
cm = "!f() { git commit -S -m \"$@\"; }; f"
# Create new local repo, perform initial commit, and push
launch = "!f() { git init; git chore \"first commit\"; git b -M next; git rao $1; git puo next; }; f"
# Tell Git to start tracking branch and push to origin
puo = "!f() { git push origin --no-verify -u $@; }; f"
# Add new remote origin
rao = "!f() { git remote add origin $@; }; f"
# Rebase branch
rb = "!f() { git rebase $@; }; f"
# Remove local .git directory
restart = "!f() { rm -rf .git; echo \"removed .git directory.\"; }; f"
# Undo last commit
ulc = "!f() { git reset HEAD~1 --soft; }; f"
# Conventional Commits
# See: https://www.conventionalcommits.org/
# See: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type
[alias]
# Changes that affect the build system or external dependencies
build = "!f() { git ac \"build: $@\"; }; f"
# Changes to our CI configuration files and scripts
ci = "!f() { git ac \"ci: $@\"; }; f"
# Changes that don't impact external users
chore = "!f() { git ac \"chore: $@\"; }; f"
# Documentation only changes
docs = "!f() { git ac \"docs: $@\"; }; f"
# New features
feat = "!f() { git ac \"feat: $@\"; }; f"
# Bug fixes
fix = "!f() { git ac \"fix: $@\"; }; f"
# Performance improvements
perf = "!f() { git ac \"perf: $@\"; }; f"
# Code improvements
refactor = "!f() { git ac \"refactor: $@\"; }; f"
# Revert past changes
revert = "!f() { git ac \"revert: $@\"; }; f"
# Changes that do not affect the meaning of the code
style = "!f() { git ac \"style: $@\"; }; f"
# Adding missing tests or correcting existing tests
test = "!f() { git ac \"test: $@\"; }; f"
# Work in progress (i.e feature implemented, but not tested)
wip = "!f() { git ac \"wip: $@\"; }; f"
# Branch Naming Conventions Aliases
[alias]
# Create a new bugfix branch and push upstream
chbb = "!f() { git chb bugfix/$@; }; f"
# Create a new hotfix branch and push upstream
chbh = "!f() { git chb hotfix/$@; }; f"
# Create a new feature branch and push upstream
chbf = "!f() { git chb feat/$@; }; f"
# Create a new release branch and push upstream
chbr = "!f() { git chb release/$@; }; f"
# Create a new support branch and push upstream
chbs = "!f() { git chb support/$@; }; f"
# Helper Aliases
[alias]
# Generate a SSH key
keygen = "!f() { ssh-keygen -t rsa -b 4096 -C \"$@\"; }; f"
# Recursively delete files matching a pattern
pdel = "!f() { find . -type f -name \"$@\" -delete; }; f"
# Generate a secret signing key
signingkey = "!f() { openssl rand -base64 32; }; f"
# Husky
[alias]
# Force push commits without running `pre-push` hook
fpnv = "!f() { git pnv --force ; }; f"
# Push commits without running `pre-push` hook
pnv = "!f() { git push --no-verify $@; }; f"
[commit]
gpgSign = true
[core]
autocrlf = input
ignorecase = false
[gitflow "prefix"]
feature = feat/
hotfix = hotfix/
release = release/
support = support/
versiontag = v
[gpg]
program = /usr/local/bin/gpg
[init]
defaultBranch = next
[pull]
rebase = true
[url "[email protected]:"]
insteadOf = bb:
[url "[email protected]:"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist: