-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitShorthand.html
330 lines (326 loc) · 17 KB
/
gitShorthand.html
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>git命令简写</title>
<style type="text/css">
tr {
border-top-width:1px;
border-top-style:solid;
border-top-color:rgb(204,204,204);
background-color:rgb(248,248,248)
}
td {
padding:6px 13px;
border:1px solid
rgb(221,221,221)
}
</style>
</head>
<body>
<table>
<tr>
<th>简写</th>
<th>正常命令</th>
</tr>
<tr>
<td>g</td>
<td>git</td>
</tr>
<tr>
<td>gst</td>
<td>git status</tr>
<tr >
<td>gd</td>
<td>git diff
</tr>
<tr>
<td>gdc</td>
<td>git diff --cached</td>
</tr>
<tr>
<td>gdv</td>
<td>git diff -w "$@" | view </td>
</tr>
<tr>
<td>gcmsg</td>
<td>git commit -m</td>
</tr>
<tr>
<td>gl</td>
<td>git pull</td>
</tr>
<tr>
<td>gp</td>
<td>git push</td>
</tr>
<tr>
<td>gup</td>
<td>git pull --rebase</td>
</tr>
<tr>
<td>gc</td>
<td>git commit -v</td>
</tr>
<tr>
<td>gc!</td>
<td>git commit -v --amend</td>
</tr>
<tr>
<td>gca</td>
<td>git commit -v -a</td>
</tr>
<tr>
<td>gca!</td>
<td>git commit -v -a --amend</td>
</tr>
<tr>
<td>gm</td>
<td>git merge</td>
</tr>
<tr>
<td>grh</td>
<td>git reset HEAD</td>
</tr>
<tr >
<td>gco</td>
<td>git checkout</td>
</tr>
<tr>
<td>gcm</td>
<td>git checkout master</td>
</tr>
<tr>
<td>gr</td>
<td>git remote</td>
</tr>
<tr>
<td>grv</td>
<td>git remote -v</td>
</tr>
<tr>
<td>grmv</td>
<td>git remote rename</td>
</tr>
<tr>
<td>grrm</td>
<td>git remote remove</td>
</tr>
<tr>
<td>grset</td>
<td>git remote set-url</td>
</tr>
<tr>
<td>grup</td>
<td>git remote update</td>
</tr>
<tr>
<td>grbi</td>
<td>git rebase -i</td>
</tr>
<tr>
<td>ga</td>
<td>git add</td>
</tr>
<tr>
<td>gb</td>
<td>git branch</td>
</tr>
<tr>
<td>gba</td>
<td>git branch -a</td>
</tr>
<!-- <tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">grbc</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git rebase --continue</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">grba</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git rebase --abort</pre>
</td>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gcount</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git shortlog -sn</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gcl</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git config --list</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gcp</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git cherry-pick</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">glg</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git log --stat --max-count=10</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">glgg</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git log --graph --max-count=10</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">glgga</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git log --graph --decorate --all</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">glo</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git log --oneline --decorate --color</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">glog</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git log --oneline --decorate --color --graph</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gss</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git status -s</pre>
</td>
</tr> -->
<tr>
<td>grh</td>
<td>git reset HEAD</td>
</tr>
<tr>
<td>grhh</td>
<td>git reset HEAD --hard</td>
</tr>
<tr>
<td>gclean</td>
<td>git reset --hard && git clean -dfx</td>
</tr>
<!-- <tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gwc</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git whatchanged -p --abbrev-commit --pretty=medium</pre>
</td>
</tr> -->
<tr>
<td>gpoat</td>
<td >git push origin --all && git push origin --tags</td>
</tr>
<!-- <tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gmt</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git mergetool --no-prompt</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gg</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git gui citool</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gga</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git gui citool --amend</pre>
</td>
</tr>
<tr>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gk</pre>
</td>
<td>
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gitk --all --branches</pre>
</td>
</tr> -->
<tr>
<td>gsts</td>
<td>git stash show --text</td>
</tr>
<tr>
<td>gsta</td>
<td>git stash</td>
</tr>
<tr>
<td>gstp</td>
<td>git stash pop</td>
</tr>
<tr>
<td>gstd</td>
<td>git stash drop</td>
</tr>
<!-- <tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">grt</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">cd $(git rev-parse --show-toplevel || echo ".")</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git-svn-dcommit-push</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git svn dcommit && git push github master:svntrunk</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204); background-color:rgb(248,248,248)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gsr</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git svn rebase</pre>
</td>
</tr>
<tr style="border-top-width:1px; border-top-style:solid; border-top-color:rgb(204,204,204)">
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">gsd</pre>
</td>
<td style="padding:6px 13px; border:1px solid rgb(221,221,221)">
<pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)">git svn dcommit</pre>
</td>
</tr> -->
</table>
</body>
</html>