-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
131 lines (94 loc) · 2.78 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
# GIT CONFIGURATION
# http://michaelwales.com/articles/make-gitconfig-work-for-you
# aliases - basic helpers
[alias]
# add and commit
ac = "!f() { git add . && git cm \"$@\"; }; f"
# add new remote
ar = "!f() { git remote add \"$0\" \"$1\"; }; f"
# delete branch locally
bdel = "!f() { git branch -d $@; }; f"
# delete branch remotely
bdelr = "!f() { git push origin --no-verify --delete $@; }; f"
# rename branch
bren = "!f() { git branch -m $@ && git pou $@; }; f"
# checkout and push new branch to origin
chb = "!f() { git checkout -b \"$@\" && git pou \"$@\"; }; f"
# checkout branch and pull latest version
chp = "!f() { git checkout $@ && git pull; }; f"
# commit with message
cm = "!f() { git commit -S -s -m \"$@\"; }; f"
# tell git to start tracking branch and push to origin
pou = "!f() { git push origin --no-verify -u $@; }; f"
# remove local .git directory
restart = "!f() { rm -rf .git; echo \"removed .git directory.\"; }; f"
# create new local repo and perform initial commit
setup = "!f() { git init && git config branch.autosetuprebase always && git config core.ignorecase false && git config pull.rebase true && git config rebase.autoStash true && git ac \"chore: initial commit\"; }; f"
# undo last commit
ulc = "!f() { git reset head~1 --soft; }; f"
# aliases - branch naming conventions
[alias]
# create new feature branch and push upstream
chbfeat = "!f() { git chb feat/$@; }; f"
# create new bugfix (feature) branch and push upstream
chbfix = "!f() { git chb feat/fix/$@; }; f"
# create new hotfix branch and push upstream
chbhotfix = "!f() { git chb hotfix/$@; }; f"
# create new release branch and push upstream
chbrelease = "!f() { git chb release/$@; }; f"
# aliases - 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"
[branch]
autoSetupRebase = always
[checkout]
defaultRemote = origin
[color]
ui = true
[commit]
gpgsign = true
[core]
autocrlf = false
editor = code-insiders --wait
ignorecase = false
safecrlf = false
[diff]
tool = vscode
[difftool "vscode"]
cmd = code-insiders --wait --diff $LOCAL $REMOTE
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[gitflow "prefix"]
feature = feat/
hotfix = hotfix/
release = release/
support = feat/fix/
[gpg]
program = gpg2
[init]
defaultBranch = main
[log]
date = iso8601-strict
decorate = short
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code-insiders --wait --merge $REMOTE $LOCAL $BASE $MERGED
[pull]
rebase = true
[rebase]
autoStash = true
[tag]
forceSignAnnotated = true
gpgsign = true
sort = -creatordate
[url "[email protected]:"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist: