-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
553 lines (503 loc) · 81.9 KB
/
atom.xml
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Jingboo's blog</title>
<subtitle>漫步走</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://hanjingboo.github.io/"/>
<updated>2016-05-22T17:15:07.664Z</updated>
<id>http://hanjingboo.github.io/</id>
<author>
<name>Jingboo</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>hexo常用命令</title>
<link href="http://hanjingboo.github.io/2015/05/23/hexo%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/"/>
<id>http://hanjingboo.github.io/2015/05/23/hexo常用命令/</id>
<published>2015-05-23T01:01:35.000Z</published>
<updated>2016-05-22T17:15:07.664Z</updated>
<content type="html"><h2 id="hexo"><a href="#hexo" class="headerlink" title="hexo"></a>hexo</h2><figure class="highlight coffeescript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">npm</span> install hexo -g <span class="comment">#安装 </span></span><br><span class="line"><span class="built_in">npm</span> update hexo -g <span class="comment">#升级 </span></span><br><span class="line">hexo init <span class="comment">#初始化</span></span><br></pre></td></tr></table></figure>
<h2 id="简写"><a href="#简写" class="headerlink" title="简写"></a>简写</h2><p><code>hexo n &quot;我的博客&quot;</code> == <code>hexo new &quot;我的博客&quot;</code> #新建文章<br><code>hexo p</code> == <code>hexo publish</code><br><code>hexo g</code> == <code>hexo generate</code>#生成<br><code>hexo s</code> == <code>hexo server</code> #启动服务预览<br><code>hexo d</code> == <code>hexo deploy</code>#部署</p>
<h2 id="服务器"><a href="#服务器" class="headerlink" title="服务器"></a>服务器</h2><p><code>hexo server</code> #Hexo 会监视文件变动并自动更新,您无须重启服务器。<br><code>hexo server -s</code> #静态模式<br><code>hexo server -p 5000</code> #更改端口<br><code>hexo server -i 192.168.1.1</code> #自定义 IP</p>
<p><code>hexo clean</code> #清除缓存 网页正常情况下可以忽略此条命令<br><code>hexo g</code> #生成静态网页<br><code>hexo d</code> #开始部署</p>
<h3 id="监视文件变动"><a href="#监视文件变动" class="headerlink" title="监视文件变动"></a>监视文件变动</h3><p><code>hexo generate</code> #使用 Hexo 生成静态文件快速而且简单<br><code>hexo generate --watch</code> #监视文件变动</p>
<h3 id="完成后部署"><a href="#完成后部署" class="headerlink" title="完成后部署"></a>完成后部署</h3><blockquote>
<p>两个命令的作用是相同的<br><code>hexo generate --deploy</code><br><code>hexo deploy --generate</code></p>
</blockquote>
<p><code>hexo deploy -g</code><br><code>hexo server -g</code></p>
<h2 id="草稿"><a href="#草稿" class="headerlink" title="草稿"></a>草稿</h2><p><code>hexo publish [layout] &lt;title&gt;</code></p>
<h2 id="模版"><a href="#模版" class="headerlink" title="模版"></a>模版</h2><p><code>hexo new &quot;postName&quot;</code> #新建文章<br><code>hexo new page &quot;pageName&quot;</code> #新建页面<br><code>hexo generate</code> #生成静态页面至public目录<br><code>hexo server</code> #开启预览访问端口(默认端口4000,’ctrl + c’关闭server)<br><code>hexo deploy</code> #将.deploy目录部署到GitHub</p>
<p><code>hexo new [layout] &lt;title&gt;</code><br><code>hexo new photo &quot;My Gallery&quot;</code><br><code>hexo new &quot;Hello World&quot; --lang tw</code></p>
<table>
<thead>
<tr>
<th>变量</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>layout</td>
<td>布局</td>
</tr>
<tr>
<td>title</td>
<td>标题</td>
</tr>
<tr>
<td>date</td>
<td>文件建立日期</td>
</tr>
</tbody>
</table>
<figure class="highlight groovy"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">title:</span> 使用Hexo搭建个人博客</span><br><span class="line"><span class="string">layout:</span> post</span><br><span class="line"><span class="string">date:</span> <span class="number">2014</span><span class="number">-03</span><span class="number">-03</span> <span class="number">19</span>:<span class="number">07</span>:<span class="number">43</span></span><br><span class="line"><span class="string">comments:</span> <span class="literal">true</span></span><br><span class="line"><span class="string">categories:</span> Blog</span><br><span class="line"><span class="string">tags:</span> [Hexo]</span><br><span class="line"><span class="string">keywords:</span> Hexo, Blog</span><br><span class="line"><span class="string">description:</span> 生命在于折腾,又把博客折腾到Hexo了。给Hexo点赞。</span><br></pre></td></tr></table></figure>
<h2 id="模版(Scaffold)"><a href="#模版(Scaffold)" class="headerlink" title="模版(Scaffold)"></a>模版(Scaffold)</h2><p><code>hexo new photo &quot;My Gallery&quot;</code></p>
<table>
<thead>
<tr>
<th>变量</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>layout</td>
<td>布局</td>
</tr>
<tr>
<td>title</td>
<td>标题</td>
</tr>
<tr>
<td>date</td>
<td>文件建立日期</td>
</tr>
</tbody>
</table>
<h2 id="设置文章摘要"><a href="#设置文章摘要" class="headerlink" title="设置文章摘要"></a>设置文章摘要</h2><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">以上是文章摘要 <span class="comment">&lt;!--more--&gt;</span> 以下是余下全文</span><br></pre></td></tr></table></figure>
<h2 id="写作"><a href="#写作" class="headerlink" title="写作"></a>写作</h2><p><code>hexo new page &lt;title&gt;</code><br><code>hexo new post &lt;title&gt;</code></p>
<table>
<thead>
<tr>
<th>变量</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>:title</td>
<td>标题</td>
</tr>
<tr>
<td>:year</td>
<td>建立的年份(4 位数)</td>
</tr>
<tr>
<td>:month</td>
<td>建立的月份(2 位数)</td>
</tr>
<tr>
<td>:i_month</td>
<td>建立的月份(去掉开头的零)</td>
</tr>
<tr>
<td>:day</td>
<td>建立的日期(2 位数)</td>
</tr>
<tr>
<td>:i_day</td>
<td>建立的日期(去掉开头的零)</td>
</tr>
</tbody>
</table>
<h3 id="推送到服务器上"><a href="#推送到服务器上" class="headerlink" title="推送到服务器上"></a>推送到服务器上</h3><p><code>hexo n</code> #写文章<br><code>hexo g</code> #生成<br><code>hexo d</code> #部署 #可与<code>hexo g</code>合并为 <code>hexo d -g</code></p>
<h2 id="报错"><a href="#报错" class="headerlink" title="报错"></a>报错</h2><h3 id="找不到git部署"><a href="#找不到git部署" class="headerlink" title="找不到git部署"></a>找不到git部署</h3><figure class="highlight gauss"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">ERROR</span> Deployer <span class="keyword">not</span> found: git</span><br></pre></td></tr></table></figure>
<p><strong>解决方法</strong></p>
<p><code>npm install hexo-deployer-git --save</code></p>
<h3 id="部署类型设置git"><a href="#部署类型设置git" class="headerlink" title="部署类型设置git"></a>部署类型设置git</h3><p>hexo 3.0 部署类型不再是<code>github</code>,<code>_config.yml</code> 中修改</p>
<figure class="highlight dts"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta"># Deployment</span></span><br><span class="line"><span class="meta">## Docs: http:<span class="comment">//hexo.io/docs/deployment.html</span></span></span><br><span class="line"><span class="symbol">deploy:</span></span><br><span class="line"><span class="symbol"> type:</span> git</span><br><span class="line"><span class="symbol"> repository:</span> git@***.github.com:***<span class="comment">/***.github.io.git</span><br><span class="line"> branch: master</span></span><br></pre></td></tr></table></figure>
<h3 id="xcodebuild"><a href="#xcodebuild" class="headerlink" title="xcodebuild"></a>xcodebuild</h3><p>xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance</p>
<p><code>npm install bcrypt</code></p>
<h3 id="RSS不显示"><a href="#RSS不显示" class="headerlink" title="RSS不显示"></a>RSS不显示</h3><h4 id="安装RSS插件"><a href="#安装RSS插件" class="headerlink" title="安装RSS插件"></a>安装RSS插件</h4><p><code>npm install hexo-generator-feed --save</code></p>
<h4 id="开启RSS功能"><a href="#开启RSS功能" class="headerlink" title="开启RSS功能"></a>开启RSS功能</h4><p>编辑hexo/_config.yml,添加如下代码:</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rss: /atom.<span class="keyword">xml</span> <span class="title">#rss</span>地址 默认即可</span><br></pre></td></tr></table></figure>
<h4 id="开启评论"><a href="#开启评论" class="headerlink" title="开启评论"></a>开启评论</h4><p>1.我使用多说代替自带的评论,在<a href="http://duoshuo.com" target="_blank" rel="external">多说</a> 网站注册 &gt; 后台管理 &gt; 添加新站点 &gt; 工具 === 复制通用代码 里面有 short_name</p>
<ol>
<li><p>在根目录 <code>_config.yml</code> 添加一行 <code>disqus_shortname: jslite</code> 是在多说注册时产生的</p>
</li>
<li><p>复制到 <code>themes\landscape\layout\_partial\article.ejs</code><br> 把</p>
</li>
</ol>
<figure class="highlight mojolicious"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"><span class="tag">&lt;<span class="name">%</span></span></span><span class="perl"> <span class="keyword">if</span> (!<span class="keyword">index</span> &amp;&amp; post.comments &amp;&amp; config.disqus_shortname)&#123; </span><span class="xml"><span class="tag">%&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">section</span> <span class="attr">id</span>=<span class="string">"comments"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"disqus_thread"</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">noscript</span>&gt;</span>Please enable JavaScript to view the <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"//disqus.com/?ref_noscript"</span>&gt;</span>comments powered by Disqus.<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">noscript</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">section</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><span class="perl"> &#125; </span><span class="xml"><span class="tag">%&gt;</span></span></span><br></pre></td></tr></table></figure>
<p>改为</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (!<span class="attr">index</span> &amp;&amp; <span class="attr">post.comments</span> &amp;&amp; <span class="attr">config.disqus_shortname</span>)&#123; %&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">section</span> <span class="attr">id</span>=<span class="string">"comments"</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 多说评论框 start --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"ds-thread"</span> <span class="attr">data-thread-key</span>=<span class="string">"&lt;%= post.layout %&gt;-&lt;%= post.slug %&gt;"</span> <span class="attr">data-title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">data-url</span>=<span class="string">"&lt;%= page.permalink %&gt;"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 多说评论框 end --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 多说公共JS代码 start (一个网页只需插入一次) --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span>&gt;</span><span class="javascript"></span><br><span class="line"> <span class="keyword">var</span> duoshuoQuery = &#123;short_name:<span class="string">'&lt;%= config.disqus_shortname %&gt;'</span>&#125;;</span><br><span class="line"> (<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line"> <span class="keyword">var</span> ds = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</span><br><span class="line"> ds.type = <span class="string">'text/javascript'</span>;ds.async = <span class="literal">true</span>;</span><br><span class="line"> ds.src = (<span class="built_in">document</span>.location.protocol == <span class="string">'https:'</span> ? <span class="string">'https:'</span> : <span class="string">'http:'</span>) + <span class="string">'//static.duoshuo.com/embed.js'</span>;</span><br><span class="line"> ds.charset = <span class="string">'UTF-8'</span>;</span><br><span class="line"> (<span class="built_in">document</span>.getElementsByTagName(<span class="string">'head'</span>)[<span class="number">0</span>] </span><br><span class="line"> || <span class="built_in">document</span>.getElementsByTagName(<span class="string">'body'</span>)[<span class="number">0</span>]).appendChild(ds);</span><br><span class="line"> &#125;)();</span><br><span class="line"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 多说公共JS代码 end --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">section</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</content>
<summary type="html">
<h2 id="hexo"><a href="#hexo" class="headerlink" title="hexo"></a>hexo</h2><figure class="highlight coffeescript"><table><tr><td class="gutt
</summary>
<category term="技术" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/"/>
<category term="Hexo" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/Hexo/"/>
<category term="hexo" scheme="http://hanjingboo.github.io/tags/hexo/"/>
<category term="github" scheme="http://hanjingboo.github.io/tags/github/"/>
<category term="博客" scheme="http://hanjingboo.github.io/tags/%E5%8D%9A%E5%AE%A2/"/>
</entry>
<entry>
<title>前端知识</title>
<link href="http://hanjingboo.github.io/2015/05/23/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86/"/>
<id>http://hanjingboo.github.io/2015/05/23/前端知识/</id>
<published>2015-05-22T22:53:21.000Z</published>
<updated>2016-05-22T16:44:19.009Z</updated>
<content type="html"><p>前言:包含前端开发知识的方方面面,方便查漏补缺,完善知识体系。<br><a id="more"></a></p>
<ul>
<li><p>前端工程师</p>
<ul>
<li>浏览器<ul>
<li>IE6/<a href="http://www.microsoft.com/en-US/download/details.aspx?id=2" target="_blank" rel="external">7</a>/<a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-8" target="_blank" rel="external">8</a>/<a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-9/worldwide-languages" target="_blank" rel="external">9</a>/<a href="http://windows.microsoft.com/en-US/internet-explorer/ie-10-worldwide-languages" target="_blank" rel="external">10</a>/<a href="http://windows.microsoft.com/en-US/internet-explorer/ie-11-worldwide-languages" target="_blank" rel="external">11</a> (Trident)</li>
<li><a href="http://www.mozilla.org/en-US/" target="_blank" rel="external">Firefox</a> (Gecko)</li>
<li><a href="http://www.google.com/chrome" target="_blank" rel="external">Chrome</a>/<a href="http://www.chromium.org/" target="_blank" rel="external">Chromium</a> (Blink)</li>
<li><a href="http://www.apple.com/safari/" target="_blank" rel="external">Safari</a> (WebKit)</li>
<li><a href="http://www.opera.com/" target="_blank" rel="external">Opera</a> (Blink)</li>
<li>(win10)<a href="http://zh.wikipedia.org/wiki/Spartan" target="_blank" rel="external">spartan</a></li>
</ul>
</li>
<li>编程语言<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/JavaScript" target="_blank" rel="external">JavaScript</a>/<a href="http://nodejs.org/" target="_blank" rel="external">Node.js</a></li>
<li><a href="http://coffeescript.org/" target="_blank" rel="external">CoffeeScript</a></li>
<li><a href="http://www.typescriptlang.org/" target="_blank" rel="external">TypeScript</a></li>
</ul>
</li>
<li>切页面<ul>
<li><a href="http://www.w3.org/html/" target="_blank" rel="external">HTML</a>/<a href="http://www.w3.org/TR/html5/" target="_blank" rel="external">HTML5</a></li>
<li><a href="http://www.w3.org/Style/CSS/" target="_blank" rel="external">CSS/CSS3</a></li>
<li><a href="http://sass-lang.com/" target="_blank" rel="external">Sass</a>/<a href="http://lesscss.org/" target="_blank" rel="external">LESS</a>/<a href="http://learnboost.github.io/stylus/" target="_blank" rel="external">Stylus</a></li>
<li><a href="http://www.photoshop.com/products/photoshop" target="_blank" rel="external">PhotoShop</a>/<a href="http://www.getpaint.net/" target="_blank" rel="external">Paint.net</a>/<a href="http://www.adobe.com/cn/products/fireworks.html" target="_blank" rel="external">Fireworks</a>/<a href="http://www.gimp.org/" target="_blank" rel="external">GIMP</a>/<a href="http://bohemiancoding.com/sketch/" target="_blank" rel="external">Sketch</a></li>
</ul>
</li>
<li>开发工具<ul>
<li>编辑器和IDE<ul>
<li><a href="http://www.vim.org/" target="_blank" rel="external">VIM</a>/<a href="http://www.sublimetext.com/" target="_blank" rel="external">Sublime Text2||3</a></li>
<li><a href="http://notepad-plus-plus.org/" target="_blank" rel="external">Notepad++</a>/<a href="http://www.editplus.com/" target="_blank" rel="external">EditPlus</a></li>
<li><a href="http://www.jetbrains.com/idea/" target="_blank" rel="external">WebStorm/IDEA</a></li>
<li><a href="http://www.gnu.org/software/emacs/" target="_blank" rel="external">Emacs</a> <a href="http://emacswiki.org" target="_blank" rel="external">EmacsWiki</a></li>
<li><a href="http://brackets.io" target="_blank" rel="external">Brackets</a></li>
<li><a href="https://atom.io/" target="_blank" rel="external">Atom</a></li>
<li><a href="http://limetext.org/" target="_blank" rel="external">Lime Text</a></li>
<li><a href="http://lighttable.com/" target="_blank" rel="external">Light Table</a></li>
<li><a href="https://www.codebox.io/" target="_blank" rel="external">Codebox</a></li>
<li><a href="http://macromates.com/" target="_blank" rel="external">TextMate</a></li>
<li><a href="http://neovim.org/" target="_blank" rel="external">Neovim</a></li>
<li><a href="http://www.activestate.com/komodo-edit" target="_blank" rel="external">Komodo IDE / Edit</a></li>
<li><a href="http://www.eclipse.org/" target="_blank" rel="external">Eclipse系列</a></li>
<li><a href="http://www.visualstudio.com/" target="_blank" rel="external">Visual Studio</a></li>
<li><a href="https://netbeans.org/" target="_blank" rel="external">NetBeans</a></li>
<li><a href="http://c9.io/" target="_blank" rel="external">Cloud9 IDE</a></li>
<li><a href="http://www.dcloud.io/" target="_blank" rel="external">HBuilder</a></li>
</ul>
</li>
<li>调试工具<ul>
<li><a href="http://getfirebug.com/" target="_blank" rel="external">Firebug</a>/<a href="https://addons.mozilla.org/en-US/firefox/addon/firecookie/" target="_blank" rel="external">Firecookie</a></li>
<li><a href="http://developer.yahoo.com/yslow/" target="_blank" rel="external">YSlow</a></li>
<li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=18359" target="_blank" rel="external">IEDeveloperToolbar</a>/<a href="http://www.my-debugbar.com/wiki/IETester/HomePage" target="_blank" rel="external">IETester</a></li>
<li><a href="http://www.fiddler2.com/fiddler2/" target="_blank" rel="external">Fiddler</a></li>
<li><a href="https://developers.google.com/chrome-developer-tools/" target="_blank" rel="external">Chrome Dev Tools</a></li>
<li><a href="http://www.opera.com/dragonfly/" target="_blank" rel="external">Dragonfly</a></li>
<li><a href="http://www.debugbar.com/" target="_blank" rel="external">DebugBar</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Venkman" target="_blank" rel="external">Venkman</a></li>
</ul>
</li>
<li>版本管理<ul>
<li><a href="git-scm.com/">Git</a>/<a href="http://subversion.apache.org/" target="_blank" rel="external">SVN</a>/<a href="http://mercurial.selenic.com/" target="_blank" rel="external">Mercurial</a></li>
<li><a href="https://github.com/" target="_blank" rel="external">Github</a>/<a href="https://about.gitlab.com/" target="_blank" rel="external">GitLab</a>/<a href="https://bitbucket.org/" target="_blank" rel="external">Bitbucket</a>/<a href="http://code.google.com/hosting/" target="_blank" rel="external">Google Code</a>/<a href="https://gitorious.org/" target="_blank" rel="external">Gitorious</a>/<a href="http://savannah.gnu.org/" target="_blank" rel="external">GNU Savannah</a>/<a href="https://launchpad.net/" target="_blank" rel="external">Launchpad</a>/<a href="http://sourceforge.net/" target="_blank" rel="external">SourceForge</a>/<a href="http://www.collab.net/products/teamforge" target="_blank" rel="external">TeamForge</a></li>
</ul>
</li>
</ul>
</li>
<li>代码质量<ul>
<li>Coding style<ul>
<li><a href="http://www.jslint.com/" target="_blank" rel="external">JSLint</a>/<a href="http://www.jshint.com/" target="_blank" rel="external">JSHint</a>/<a href="https://github.com/mdevils/node-jscs" target="_blank" rel="external">jscs</a></li>
<li><a href="http://csslint.net/" target="_blank" rel="external">CSSLint</a></li>
<li><a href="http://validator.w3.org/" target="_blank" rel="external">Markup Validation Service</a></li>
<li><a href="https://validator.whatwg.org/" target="_blank" rel="external">HTML Validators</a></li>
</ul>
</li>
<li>单元测试<ul>
<li><a href="http://qunitjs.com/" target="_blank" rel="external">QUnit</a>/<a href="http://pivotal.github.com/jasmine/" target="_blank" rel="external">Jasmine</a></li>
<li><a href="http://visionmedia.github.com/mocha/" target="_blank" rel="external">Mocha</a>/<a href="https://github.com/visionmedia/should.js/" target="_blank" rel="external">Should</a>/<a href="http://chaijs.com/" target="_blank" rel="external">Chai</a>/<a href="https://github.com/LearnBoost/expect.js/" target="_blank" rel="external">Expect</a></li>
<li><a href="http://unitjs.com/" target="_blank" rel="external">Unit JS</a></li>
</ul>
</li>
<li>自动化测试<ul>
<li><a href="http://docs.seleniumhq.org/docs/03_webdriver.jsp" target="_blank" rel="external">WebDriver</a>/<a href="https://github.com/angular/protractor" target="_blank" rel="external">Protractor</a>/<a href="https://github.com/karma-runner/karma" target="_blank" rel="external">Karma Runner</a>/<a href="http://sahi.co.in/" target="_blank" rel="external">Sahi</a></li>
<li><a href="http://phantomjs.org/" target="_blank" rel="external">phantomjs</a></li>
<li><a href="https://saucelabs.com/" target="_blank" rel="external">SourceLabs</a>/<a href="http://www.browserstack.com/" target="_blank" rel="external">BrowserStack</a></li>
</ul>
</li>
</ul>
</li>
<li>前端库/框架<ul>
<li><a href="http://jquery.com/" target="_blank" rel="external">jQuery</a>/<a href="http://underscorejs.org/" target="_blank" rel="external">Underscore</a>/<a href="http://mootools.net/" target="_blank" rel="external">Mootools</a>/<a href="http://www.prototypejs.org/" target="_blank" rel="external">Prototype.js</a></li>
<li><a href="http://yuilibrary.com/projects/yui3/" target="_blank" rel="external">YUI3</a>/<a href="http://dojotoolkit.org/" target="_blank" rel="external">Dojo</a>/<a href="http://www.sencha.com/products/extjs" target="_blank" rel="external">ExtJS</a>/<a href="http://docs.kissyui.com/" target="_blank" rel="external">KISSY</a></li>
<li><a href="http://backbonejs.org/" target="_blank" rel="external">Backbone</a>/<a href="http://knockoutjs.com/" target="_blank" rel="external">KnockoutJS</a>/<a href="http://emberjs.com/" target="_blank" rel="external">Emberjs</a></li>
<li><a href="http://angularjs.org/" target="_blank" rel="external">AngularJS</a><ul>
<li><a href="https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk" target="_blank" rel="external">Batarang</a></li>
</ul>
</li>
<li><a href="http://getbootstrap.com/" target="_blank" rel="external">Bootstrap</a></li>
<li><a href="http://www.semantic-ui.com/" target="_blank" rel="external">Semantic UI</a></li>
<li><a href="http://juiceui.com/" target="_blank" rel="external">Juice UI</a></li>
<li><a href="http://webatomsjs.neurospeech.com/" target="_blank" rel="external">Web Atoms</a></li>
<li><a href="http://docs.polymerchina.org/" target="_blank" rel="external">Polymer</a></li>
<li><a href="http://dhtmlx.com/" target="_blank" rel="external">Dhtmlx</a></li>
<li><a href="http://qooxdoo.org/" target="_blank" rel="external">qooxdoo</a></li>
<li><a href="http://facebook.github.io/react/" target="_blank" rel="external">React</a></li>
<li><a href="http://mozbrick.github.io/" target="_blank" rel="external">Brick</a></li>
<li><a href="http://knockoutjs.com/" target="_blank" rel="external">Knockout</a></li>
</ul>
</li>
<li>前端标准/规范<ul>
<li>HTTP/1.1: RFCs 7230-7235</li>
<li><a href="https://http2.github.io/" target="_blank" rel="external">HTTP/2</a></li>
<li><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" target="_blank" rel="external">ECMAScript3/5</a></li>
<li><a href="http://www.w3.org/TR/" target="_blank" rel="external">W3C: DOM/BOM/XHTML/XML/JSON/JSONP/…</a></li>
<li><a href="http://wiki.commonjs.org/wiki/Modules/1.0" target="_blank" rel="external">CommonJS Modules</a>/<a href="https://github.com/amdjs/amdjs-api/wiki/AMD" target="_blank" rel="external">AMD</a></li>
<li><a href="http://www.w3.org/html/wg/drafts/html/master/" target="_blank" rel="external">HTML5</a>/<a href="http://www.w3.org/Style/CSS/specs.en.html" target="_blank" rel="external">CSS3</a></li>
<li><a href="http://semanticweb.org/" target="_blank" rel="external">Semantic Web</a><ul>
<li><a href="http://schema.org" target="_blank" rel="external">MicroData</a></li>
<li><a href="http://www.w3.org/TR/rdfa-core/" target="_blank" rel="external">RDFa</a></li>
</ul>
</li>
<li><a href="http://www.w3.org/WAI/" target="_blank" rel="external">Web Accessibility</a><ul>
<li><a href="http://www.w3.org/TR/WAI-WEBCONTENT/" target="_blank" rel="external">WCAG</a></li>
<li><a href="http://www.w3.org/TR/role-attribute/" target="_blank" rel="external">Role Attribute</a></li>
<li><a href="http://www.w3.org/TR/wai-aria/" target="_blank" rel="external">WAI-ARIA</a></li>
</ul>
</li>
</ul>
</li>
<li>性能<ul>
<li><a href="http://jsperf.com/" target="_blank" rel="external">JSPerf</a></li>
<li><a href="http://developer.yahoo.com/performance/rules.html" target="_blank" rel="external">YSlow 35 rules</a></li>
<li><a href="https://developers.google.com/speed/pagespeed/" target="_blank" rel="external">PageSpeed</a></li>
<li><a href="http://www.httpwatch.com/" target="_blank" rel="external">HTTPWatch</a></li>
<li><a href="http://www.compuware.com/application-performance-management/dynatrace-ajax-download.html" target="_blank" rel="external">DynaTrace’s Ajax</a></li>
<li><a href="http://book.douban.com/subject/5362856/" target="_blank" rel="external">高性能JavaScript</a></li>
</ul>
</li>
<li>SEO</li>
<li>编程知识储备<ul>
<li><a href="http://zh.wikipedia.org/wiki/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84" target="_blank" rel="external">数据结构</a></li>
<li>OOP/AOP</li>
<li><a href="http://net.tutsplus.com/tutorials/javascript-ajax/prototypes-in-javascript-what-you-need-to-know/" target="_blank" rel="external">原型链</a>/作用域链</li>
<li><a href="http://www.jibbering.com/faq/notes/closures/" target="_blank" rel="external">闭包</a></li>
<li><a href="http://zh.wikipedia.org/wiki/%E7%BC%96%E7%A8%8B%E8%8C%83%E5%9E%8B" target="_blank" rel="external">编程范型</a></li>
<li><a href="http://addyosmani.com/resources/essentialjsdesignpatterns/book/" target="_blank" rel="external">设计模式</a></li>
<li><a href="http://sanshi.me/articles/JavaScript-Garden-CN/html/index.html" target="_blank" rel="external">Javascript Tips</a></li>
</ul>
</li>
<li>部署流程<ul>
<li>压缩合并<ul>
<li><a href="http://developer.yahoo.com/yui/compressor/" target="_blank" rel="external">YUI Compressor</a></li>
<li><a href="https://developers.google.com/closure/compiler/" target="_blank" rel="external">Google Clousure Complier</a></li>
<li><a href="https://github.com/mishoo/UglifyJS" target="_blank" rel="external">UglifyJS</a></li>
<li><a href="https://github.com/GoalSmashers/clean-css" target="_blank" rel="external">CleanCSS</a></li>
</ul>
</li>
<li>文档输出<ul>
<li><a href="https://github.com/jsdoc3/jsdoc" target="_blank" rel="external">JSDoc</a></li>
<li><a href="https://github.com/visionmedia/dox" target="_blank" rel="external">Dox</a>/<a href="https://github.com/JacksonTian/doxmate" target="_blank" rel="external">Doxmate</a>/<a href="https://github.com/luozhihua/grunt-doxmate" target="_blank" rel="external">Grunt-Doxmate</a></li>
</ul>
</li>
<li>项目构建工具<ul>
<li><a href="http://www.gnu.org/software/make/" target="_blank" rel="external">make</a>/<a href="http://ant.apache.org/" target="_blank" rel="external">Ant</a></li>
<li><a href="http://code.google.com/p/gyp/" target="_blank" rel="external">GYP</a></li>
<li><a href="http://gruntjs.com/" target="_blank" rel="external">Grunt</a></li>
<li><a href="http://gulpjs.com/" target="_blank" rel="external">Gulp</a></li>
<li><a href="http://yeoman.io/" target="_blank" rel="external">Yeoman</a></li>
<li><a href="http://fis.baidu.com/" target="_blank" rel="external">FIS</a></li>
<li><a href="https://github.com/modulejs/modjs" target="_blank" rel="external">Mod</a></li>
</ul>
</li>
</ul>
</li>
<li>代码组织<ul>
<li>类库模块化<ul>
<li><a href="http://www.commonjs.org/" target="_blank" rel="external">CommonJS</a>/AMD</li>
<li><a href="http://yuilibrary.com/projects/yui3/" target="_blank" rel="external">YUI3模块</a></li>
</ul>
</li>
<li>业务逻辑模块化<ul>
<li><a href="https://github.com/twitter/bower" target="_blank" rel="external">bower</a>/<a href="https://github.com/component/component" target="_blank" rel="external">component</a></li>
</ul>
</li>
<li>文件加载<ul>
<li><a href="http://labjs.com/" target="_blank" rel="external">LABjs</a></li>
<li><a href="http://seajs.org/" target="_blank" rel="external">SeaJS</a>/<a href="http://requirejs.org/" target="_blank" rel="external">Require.js</a></li>
</ul>
</li>
<li>模块化预处理器<ul>
<li><a href="https://github.com/substack/node-browserify" target="_blank" rel="external">Browserify</a></li>
</ul>
</li>
</ul>
</li>
<li>安全<ul>
<li><a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery" target="_blank" rel="external">CSRF</a>/<a href="http://en.wikipedia.org/wiki/Cross-site_scripting" target="_blank" rel="external">XSS</a></li>
<li><a href="http://www.w3.org/TR/CSP/" target="_blank" rel="external">CSP</a></li>
<li><a href="https://developer.mozilla.org/docs/Web/Security/Same-origin_policy" target="_blank" rel="external">Same-origin policy</a></li>
<li>ADsafe/Caja/Sandbox</li>
</ul>
</li>
<li>移动Web<ul>
<li>HTML5/CSS3</li>
<li><a href="http://zh.wikipedia.org/wiki/%E5%93%8D%E5%BA%94%E5%BC%8F%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1" target="_blank" rel="external">响应式网页设计</a></li>
<li><a href="http://zeptojs.com/" target="_blank" rel="external">Zeptojs</a>/<a href="http://cubiq.org/iscroll" target="_blank" rel="external">iScroll</a></li>
<li>V5/<a href="http://www.sencha.com/products/touch" target="_blank" rel="external">Sencha Touch</a></li>
<li><a href="http://phonegap.com/" target="_blank" rel="external">PhoneGap</a></li>
<li><a href="http://jquerymobile.com/" target="_blank" rel="external">jQuery Mobile</a></li>
<li><a href="http://www.w3.org/Mobile/" target="_blank" rel="external">W3C Mobile Web Initiative</a></li>
<li><a href="http://validator.w3.org/mobile/" target="_blank" rel="external">W3C mobileOK Checker</a></li>
<li><a href="http://openmobilealliance.org/" target="_blank" rel="external">Open Mobile Alliance</a></li>
</ul>
</li>
<li>前沿技术社区/会议<ul>
<li><a href="http://d2forum.org" target="_blank" rel="external">D2</a>/<a href="http://www.webrebuild.org/" target="_blank" rel="external">WebRebuild</a></li>
<li>NodeParty/<a href="http://w3ctech.com" target="_blank" rel="external">W3CTech</a>/<a href="http://www.html5dw.com" target="_blank" rel="external">HTML5梦工厂</a></li>
<li><a href="http://jsconf.com/" target="_blank" rel="external">JSConf</a>/<a href="http://jsconf.cn" target="_blank" rel="external">沪JS(JSConf.cn)</a></li>
<li>QCon/Velocity/SDCC</li>
<li><a href="http://jsconf.com/" target="_blank" rel="external">JSConf</a>/<a href="http://www.nodeconf.com/" target="_blank" rel="external">NodeConf</a></li>
<li><a href="http://cssconf.com/" target="_blank" rel="external">CSSConf</a></li>
<li>YDN/YUIConf</li>
<li>HybridApp</li>
<li><a href="http://whatwg.org/" target="_blank" rel="external">WHATWG</a></li>
</ul>
</li>
<li>计算机知识储备<ul>
<li>编译原理</li>
<li><a href="http://zh.wikipedia.org/wiki/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C" target="_blank" rel="external">计算机网络</a></li>
<li><a href="http://zh.wikipedia.org/wiki/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F" target="_blank" rel="external">操作系统</a></li>
<li>算法原理</li>
<li>软件工程/软件测试原理</li>
<li><a href="http://www.unicode.org/" target="_blank" rel="external">Unicode</a></li>
</ul>
</li>
<li>软技能<ul>
<li>知识管理/总结分享</li>
<li>沟通技巧/团队协作</li>
<li>需求管理/PM</li>
<li>交互设计/可用性/可访问性知识</li>
</ul>
</li>
<li>可视化<ul>
<li>SVG/Canvas/VML</li>
<li>SVG: <a href="http://d3js.org/" target="_blank" rel="external">D3</a>/<a href="http://raphaeljs.com/" target="_blank" rel="external">Raphaël</a>/<a href="http://snapsvg.io/" target="_blank" rel="external">Snap.svg</a>/<a href="http://datavlab.org/datavjs/" target="_blank" rel="external">DataV</a></li>
<li>Canvas: <a href="http://www.createjs.com/" target="_blank" rel="external">CreateJS</a>/<a href="http://kineticjs.com/" target="_blank" rel="external">KineticJS</a></li>
<li><a href="http://en.wikipedia.org/wiki/WebGL" target="_blank" rel="external">WebGL</a>/<a href="http://threejs.org/" target="_blank" rel="external">Three.JS</a></li>
</ul>
</li>
</ul>
</li>
<li><p>后端知识</p>
<ul>
<li>编程语言<ul>
<li>C/C++/Java/PHP/Ruby/Python/…</li>
</ul>
</li>
<li>网页服务器<ul>
<li><a href="http://nginx.org/en/" target="_blank" rel="external">Nginx</a></li>
<li><a href="http://httpd.apache.org/" target="_blank" rel="external">Apache</a></li>
<li><a href="http://www.lighttpd.net/" target="_blank" rel="external">Lighttpd</a></li>
</ul>
</li>
<li>数据库<ul>
<li>SQL</li>
<li><a href="http://www.mysql.com/" target="_blank" rel="external">MySQL</a>/<a href="http://www.postgresql.org/" target="_blank" rel="external">PostgreSQL</a>/<a href="http://www.oracle.com/us/products/database/overview/index.html" target="_blank" rel="external">Oracle</a>/<a href="http://www-01.ibm.com/software/data/db2" target="_blank" rel="external">DB2</a></li>
<li><a href="http://www.mongodb.org/" target="_blank" rel="external">MongoDB</a>/<a href="http://couchdb.apache.org/" target="_blank" rel="external">CouchDB</a></li>
</ul>
</li>
<li>数据缓存<ul>
<li><a href="http://redis.io/" target="_blank" rel="external">Redis</a></li>
<li><a href="http://memcached.org/" target="_blank" rel="external">Memcached</a></li>
</ul>
</li>
<li>文件缓存/代理<ul>
<li><a href="https://www.varnish-cache.org/" target="_blank" rel="external">Varnish</a></li>
<li><a href="http://www.squid-cache.org/" target="_blank" rel="external">Squid</a></li>
</ul>
</li>
<li>操作系统<ul>
<li>Unix/Linux/OS X/Windows</li>
</ul>
</li>
<li>数据结构</li>
</ul>
</li>
</ul>
</content>
<summary type="html">
<p>前言:包含前端开发知识的方方面面,方便查漏补缺,完善知识体系。<br>
</summary>
<category term="技术" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/"/>
<category term="前端" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/%E5%89%8D%E7%AB%AF/"/>
<category term="知识体系" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/%E5%89%8D%E7%AB%AF/%E7%9F%A5%E8%AF%86%E4%BD%93%E7%B3%BB/"/>
<category term="前端" scheme="http://hanjingboo.github.io/tags/%E5%89%8D%E7%AB%AF/"/>
<category term="体系" scheme="http://hanjingboo.github.io/tags/%E4%BD%93%E7%B3%BB/"/>
</entry>
<entry>
<title>git简介及使用</title>
<link href="http://hanjingboo.github.io/2015/05/22/git%E7%AE%80%E4%BB%8B%E5%8F%8A%E4%BD%BF%E7%94%A8/"/>
<id>http://hanjingboo.github.io/2015/05/22/git简介及使用/</id>
<published>2015-05-22T00:11:51.000Z</published>
<updated>2016-05-22T14:56:37.757Z</updated>
<content type="html"><h2 id="git帮助"><a href="#git帮助" class="headerlink" title="git帮助"></a>git帮助</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ git <span class="built_in">help</span> <span class="comment">#显示常用的命题、简短的解释</span></span><br><span class="line">$ git <span class="built_in">help</span> <span class="_">-a</span> <span class="comment">#显示所有的命令</span></span><br><span class="line">$ git <span class="built_in">help</span> -g <span class="comment">#查看使用手册</span></span><br><span class="line">$ git <span class="built_in">help</span> add <span class="comment">#(具体的命令或手册的名称) 详细的名称、实例</span></span><br></pre></td></tr></table></figure>
<a id="more"></a>
<h2 id="git配置"><a href="#git配置" class="headerlink" title="git配置"></a>git配置</h2><blockquote>
<p>git有三个配置文件,分别是repo/.git/config,$HOME/.gitconfig,/etc/gitconfig。</p>
</blockquote>
<figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>system <span class="comment">#系统范围,系统全局配置文件,对整个系统有效,优先级最低。</span></span><br><span class="line"><span class="variable">$ </span>global <span class="comment">#用户范围,用户级别配置文件,对当前用户有效,优先级次之。</span></span><br><span class="line"><span class="variable">$ </span>local <span class="comment">#库级别配置文件,只对当前库有效,优先级最高。</span></span><br><span class="line"><span class="variable">$ </span>git config --list <span class="comment">#查看当前有效配置</span></span><br><span class="line"><span class="variable">$ </span>git config --unset --global user.name <span class="comment">#删除用户名</span></span><br><span class="line"><span class="variable">$ </span>git config --global user.name <span class="string">''</span> <span class="comment">#设置用户名</span></span><br><span class="line"><span class="variable">$ </span>git config --global user.email <span class="string">''</span></span><br><span class="line"><span class="variable">$ </span>git config --global color.ui <span class="keyword">true</span> <span class="comment">#设置color.ui为true</span></span><br><span class="line"><span class="variable">$ </span>cat ~<span class="regexp">/.gitconfig #查看配置文件</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>git支持自动完成,也就是说你输入git conf然后按tab键,系统会自动扩展为git config。对于选项依然有效,比如git config –global –color.[tab]你会看到很多选项。</p>
</blockquote>
<h2 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git init</span><br></pre></td></tr></table></figure>
<h2 id="提交"><a href="#提交" class="headerlink" title="提交"></a>提交</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git commit</span><br></pre></td></tr></table></figure>
<h2 id="对比区别"><a href="#对比区别" class="headerlink" title="对比区别"></a>对比区别</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git diff</span><br></pre></td></tr></table></figure>
<h2 id="重命名"><a href="#重命名" class="headerlink" title="重命名"></a>重命名</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>直接在文件系统上命名</span><br><span class="line"><span class="variable">$ </span>使用git mv重命名</span><br></pre></td></tr></table></figure>
<h2 id="删除文件"><a href="#删除文件" class="headerlink" title="删除文件"></a>删除文件</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git rm</span><br></pre></td></tr></table></figure>
<h2 id="恢复刚刚删除或修改的文件"><a href="#恢复刚刚删除或修改的文件" class="headerlink" title="恢复刚刚删除或修改的文件"></a>恢复刚刚删除或修改的文件</h2><figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ git checkout HEAD <span class="comment">-- </span></span><br><span class="line">$ git checkout HEAD^ <span class="comment">--</span></span><br></pre></td></tr></table></figure>
<h2 id="恢复文件的历史版本"><a href="#恢复文件的历史版本" class="headerlink" title="恢复文件的历史版本"></a>恢复文件的历史版本</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git revert</span><br></pre></td></tr></table></figure>
<h2 id="重置提交"><a href="#重置提交" class="headerlink" title="重置提交"></a>重置提交</h2><figure class="highlight brainfuck"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">$</span> <span class="comment">git</span> <span class="comment">reset</span> <span class="literal">-</span><span class="literal">-</span><span class="comment">soft/</span><span class="literal">-</span><span class="literal">-</span><span class="comment">mixed/</span><span class="literal">-</span><span class="literal">-</span><span class="comment">hard/</span></span><br></pre></td></tr></table></figure>
<h2 id="分支"><a href="#分支" class="headerlink" title="分支"></a>分支</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git branch</span><br><span class="line"><span class="variable">$ </span>git checkout </span><br><span class="line"><span class="variable">$ </span>git diff <span class="comment">#一个分支..另一个分支</span></span><br><span class="line"><span class="variable">$ </span>git merge</span><br><span class="line"><span class="variable">$ </span>git merge</span><br></pre></td></tr></table></figure>
<h2 id="git-stash-save-‘XXX’"><a href="#git-stash-save-‘XXX’" class="headerlink" title="git stash save ‘XXX’"></a>git stash save ‘XXX’</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$ </span>git stash list</span><br><span class="line"><span class="variable">$ </span>git stash show -p stash@&#123;<span class="number">0</span>&#125;</span><br><span class="line"><span class="variable">$ </span>git stash apply stash@&#123;<span class="number">0</span>&#125;</span><br><span class="line"><span class="variable">$ </span>git stash drop stash@&#123;<span class="number">0</span>&#125;</span><br></pre></td></tr></table></figure>
<h2 id="git-log"><a href="#git-log" class="headerlink" title="git log"></a>git log</h2><figure class="highlight gams"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="symbol">$</span> git <span class="built-in">log</span> --oneline --<span class="keyword">all</span> <span class="number">-5</span> --author=<span class="string">"hanjingbo"</span> --graph</span><br><span class="line"><span class="symbol">$</span> git <span class="built-in">log</span> --oneline --grep=<span class="string">'index.html'</span> </span><br><span class="line"><span class="symbol">$</span> git <span class="built-in">log</span> --oneline --before=<span class="string">'2015-03-09'</span></span><br><span class="line"><span class="symbol">$</span> git <span class="built-in">log</span> --oneline --before=<span class="string">'3 day'</span></span><br></pre></td></tr></table></figure>
</content>
<summary type="html">
<h2 id="git帮助"><a href="#git帮助" class="headerlink" title="git帮助"></a>git帮助</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ git <span class="built_in">help</span> <span class="comment">#显示常用的命题、简短的解释</span></span><br><span class="line">$ git <span class="built_in">help</span> <span class="_">-a</span> <span class="comment">#显示所有的命令</span></span><br><span class="line">$ git <span class="built_in">help</span> -g <span class="comment">#查看使用手册</span></span><br><span class="line">$ git <span class="built_in">help</span> add <span class="comment">#(具体的命令或手册的名称) 详细的名称、实例</span></span><br></pre></td></tr></table></figure>
</summary>
<category term="技术" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/"/>
<category term="Git" scheme="http://hanjingboo.github.io/categories/%E6%8A%80%E6%9C%AF/Git/"/>
<category term="git" scheme="http://hanjingboo.github.io/tags/git/"/>
<category term="版本控制" scheme="http://hanjingboo.github.io/tags/%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6/"/>
<category term="工具" scheme="http://hanjingboo.github.io/tags/%E5%B7%A5%E5%85%B7/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="http://hanjingboo.github.io/2015/05/21/hello-world/"/>
<id>http://hanjingboo.github.io/2015/05/21/hello-world/</id>
<published>2015-05-21T00:11:51.000Z</published>
<updated>2016-05-22T14:56:06.961Z</updated>
<content type="html"><p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
</content>
<summary type="html">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.
</summary>
<category term="生活" scheme="http://hanjingboo.github.io/categories/%E7%94%9F%E6%B4%BB/"/>
<category term="hello" scheme="http://hanjingboo.github.io/tags/hello/"/>
</entry>
</feed>