-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
182 lines (142 loc) · 3.71 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
[user]
name =
email =
[include]
path = .gitconfig.personal
[includeIf "gitdir:**/amboss/**/*"]
path = .gitconfig.amboss
[github]
user = deiga
[core]
excludesfile = ~/.gitignore
editor = vim
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
autocrfl = false
safecrlf = warn
trustctime = false
untrackedCache = true
[color]
status = true
diff = true
branch = true
ui = auto
grep = true
showbranch = true
[merge]
conflictstyle = diff3
stat = true
tool = vimdiff
# Include summaries of merged commits in newly created merge commit messages
log = true
[apply]
whitespace = nowarn
[alias]
init = init --template=~/.git_template
# checkout
co = checkout # checkout
nb = !git pull && git switch --track --create $1 && : # pull latest version and create and switch to a new branch (mnemonic: "git new branch branchname...")
# commit
c = commit
ca = commit --all
ci = commit
cm = commit --amend
amend = commit --amend # ammend your last commit
ammend = commit --amend # ammend your last commit
extend = commit --amend -C HEAD # Use commit message
reword = commit --amend --only # reword commit message
st = status
s = status
# branch
b = branch --verbose # branch (verbose)
# diff
d = diff # diff unstaged changes
dc = diff --cached # diff staged changes
ds = diff --staged
last = diff HEAD^ # diff last committed change
# fetch
f = fetch
zap = f -p
type = cat-file -t
dump = cat-file -p
cl = clone --recursive
unstage = reset HEAD --
disc = checkout --
discard = disc
# history
wc = whatchanged -p --abbrev-commit --pretty=medium
lg = log --color --graph \n --pretty=format:'%Cred%h%Creset \n -%C(yellow)%d%Creset %s %Cgreen(%cr) \n %C(bold blue)<%an>%Creset' \n --abbrev-commit
hist = log --pretty=format:\"%h %ad | %s%d [%an] \" --graph --date=short
report = "log --author=Timo --since='2 sunday ago' --until='1 sunday ago' --format='%Cgreen%ci%Creset %s%Creset' --no-merges"
loll = log --graph --decorate --pretty=oneline --abbrev-commit
unpushed = log @{u}
ctags = !.git/hooks/ctags
serve = daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/
today = log --since=midnight --author=\"$(git config user.name)\" --oneline
day = log --reverse --no-merges --branches=* --date=local --since=midnight --author=\"$(git config --get user.name)\"
split-subpath = filter-branch --prune-empty --subdirectory-filter
mr = pull-request
ignore = "!git-ignore"
i = ignore
update-submodule = submodule foreach git pull origin master
us = update-submodule
# rebase
rc = rebase --continue
rs = rebase --skip
ra = rebase --abort
wip = rebase -i @{u}
outstanding = wip
#push
publish = push -u origin HEAD
pub = publish
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[push]
default = simple
# Make `git push` push relevant annotated tags when pushing branches out.
followTags = true
autoSetupRemote = true
[fetch]
recurseSubmodules = true
prune = true
[credential]
helper = osxkeychain
[diff]
renames = copies
mnemonicprefix = true
tool = vimdiff
# Enable an experimental heuristic that shifts the hunk boundary in an
# attempt to make the resulting patch easier to read.
indentHeuristic = true
[diff "bin"]
# Use `hexdump` to diff binary files
textconv = hexdump -v -C
[help]
# Automatically correct and execute mistyped commands
autocorrect = 1
[branch]
autosetupmerge = true
[rerere]
enabled = true
[gh]
protocol = https
[web]
browser = open
[hub]
protocol = https
[pull]
rebase = true
[rebase]
autoStash = true
autosquash = true
[commit]
gpgsign = true
template = ~/.stCommitMsg
[gpg]
program = /opt/homebrew/bin/gpg
[ghq]
root = ~/Dropbox/Documents/Projects
[init]
defaultBranch = main
[url "https://github.com"]
insteadOf = ssh://github.com