Skip to content
Browse files

Site updated at 2013-04-01 12:53:39 UTC

  • Loading branch information...
1 parent 0498c45 commit 9e86c3720708918ffea74ef7357d3a79909d3e09 @datawolf committed Apr 1, 2013
Showing with 4,823 additions and 1 deletion.
  1. +1 −0 CNAME
  2. BIN assets/jwplayer/glow/controlbar/background.png
  3. BIN assets/jwplayer/glow/controlbar/blankButton.png
  4. BIN assets/jwplayer/glow/controlbar/divider.png
  5. BIN assets/jwplayer/glow/controlbar/fullscreenButton.png
  6. BIN assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
  7. BIN assets/jwplayer/glow/controlbar/muteButton.png
  8. BIN assets/jwplayer/glow/controlbar/muteButtonOver.png
  9. BIN assets/jwplayer/glow/controlbar/normalscreenButton.png
  10. BIN assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
  11. BIN assets/jwplayer/glow/controlbar/pauseButton.png
  12. BIN assets/jwplayer/glow/controlbar/pauseButtonOver.png
  13. BIN assets/jwplayer/glow/controlbar/playButton.png
  14. BIN assets/jwplayer/glow/controlbar/playButtonOver.png
  15. BIN assets/jwplayer/glow/controlbar/timeSliderBuffer.png
  16. BIN assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
  17. BIN assets/jwplayer/glow/controlbar/timeSliderCapRight.png
  18. BIN assets/jwplayer/glow/controlbar/timeSliderProgress.png
  19. BIN assets/jwplayer/glow/controlbar/timeSliderRail.png
  20. BIN assets/jwplayer/glow/controlbar/unmuteButton.png
  21. BIN assets/jwplayer/glow/controlbar/unmuteButtonOver.png
  22. BIN assets/jwplayer/glow/display/background.png
  23. BIN assets/jwplayer/glow/display/bufferIcon.png
  24. BIN assets/jwplayer/glow/display/muteIcon.png
  25. BIN assets/jwplayer/glow/display/playIcon.png
  26. BIN assets/jwplayer/glow/dock/button.png
  27. +115 −0 assets/jwplayer/glow/glow.xml
  28. BIN assets/jwplayer/glow/playlist/item.png
  29. BIN assets/jwplayer/glow/playlist/itemOver.png
  30. BIN assets/jwplayer/glow/playlist/sliderCapBottom.png
  31. BIN assets/jwplayer/glow/playlist/sliderCapTop.png
  32. BIN assets/jwplayer/glow/playlist/sliderRail.png
  33. BIN assets/jwplayer/glow/playlist/sliderThumb.png
  34. BIN assets/jwplayer/glow/sharing/embedIcon.png
  35. BIN assets/jwplayer/glow/sharing/embedScreen.png
  36. BIN assets/jwplayer/glow/sharing/shareIcon.png
  37. BIN assets/jwplayer/glow/sharing/shareScreen.png
  38. BIN assets/jwplayer/player.swf
  39. +1,119 −0 atom.xml
  40. +356 −0 blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/index.html
  41. +865 −0 blog/2013/04/01/git-xue-xi-bi-ji-1/index.html
  42. +636 −0 blog/2013/04/01/git-xue-xi-bi-ji-2/index.html
  43. +220 −0 blog/archives/index.html
  44. +103 −0 blog/categories/saas/atom.xml
  45. +197 −0 blog/categories/saas/index.html
  46. BIN favicon.png
  47. BIN images/bird_32_gray.png
  48. BIN images/bird_32_gray_fail.png
  49. BIN images/code_bg.png
  50. BIN images/dotted-border.png
  51. BIN images/email.png
  52. BIN images/line-tile.png
  53. BIN images/noise.png
  54. BIN images/rss.png
  55. BIN images/search.png
  56. +455 −1 index.html
  57. +32 −0 javascripts/github.js
  58. +85 −0 javascripts/libs/jXHR.js
  59. +5 −0 javascripts/libs/jquery.min.js
  60. +298 −0 javascripts/libs/swfobject-dynamic.js
  61. +5 −0 javascripts/modernizr-2.0.js
  62. +163 −0 javascripts/octopress.js
  63. +56 −0 javascripts/pinboard.js
  64. +78 −0 javascripts/twitter.js
  65. +4 −0 robots.txt
  66. +29 −0 sitemap.xml
  67. +1 −0 stylesheets/screen.css
View
1 CNAME
@@ -0,0 +1 @@
+blog.l-cloud.org
View
BIN assets/jwplayer/glow/controlbar/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/blankButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/divider.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/fullscreenButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/muteButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/muteButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/normalscreenButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/pauseButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/pauseButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/playButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/playButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/timeSliderBuffer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/timeSliderCapRight.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/timeSliderProgress.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/timeSliderRail.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/unmuteButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/controlbar/unmuteButtonOver.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/display/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/display/bufferIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/display/muteIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/display/playIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/jwplayer/glow/dock/button.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
115 assets/jwplayer/glow/glow.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<skin version="1.1" name="Glow" author="LongTail Video">
+
+ <settings>
+ <setting name="backcolor" value="0x000000" />
+ <setting name="frontcolor" value="0xeeeeee" />
+ <setting name="lightcolor" value="0xeeeeee" />
+ <setting name="screencolor" value="0x000000" />
+ </settings>
+
+ <components>
+ <component name="controlbar">
+ <settings>
+ <setting name="margin" value="0" />
+ <setting name="fontsize" value="11" />
+ <setting name="fontcolor" value="0xEEEEEE" />
+ <setting name="buttoncolor" value="0xEEEEEE" />
+ </settings>
+
+ <layout>
+ <group position="left">
+ <button name="play" />
+ <text name="elapsed" />
+ </group>
+ <group position="center">
+ <slider name="time" />
+ </group>
+ <group position="right">
+ <text name="duration" />
+ <button name="blank" />
+ <button name="mute" />
+ <button name="fullscreen" />
+ </group>
+ </layout>
+
+ <elements>
+ <element name="background" src="background.png" />
+ <element name="capLeft" src="divider.png" />
+ <element name="capRight" src="divider.png" />
+ <element name="divider" src="divider.png" />
+ <element name="blankButton" src="blankButton.png" />
+ <element name="fullscreenButton" src="fullscreenButton.png" />
+ <element name="fullscreenButtonOver" src="fullscreenButtonOver.png" />
+ <element name="muteButton" src="muteButton.png" />
+ <element name="muteButtonOver" src="muteButtonOver.png" />
+ <element name="pauseButton" src="pauseButton.png" />
+ <element name="pauseButtonOver" src="pauseButtonOver.png" />
+ <element name="playButton" src="playButton.png" />
+ <element name="playButtonOver" src="playButtonOver.png" />
+ <element name="timeSliderBuffer" src="timeSliderBuffer.png" />
+ <element name="timeSliderCapLeft" src="timeSliderCapLeft.png" />
+ <element name="timeSliderCapRight" src="timeSliderCapRight.png" />
+ <element name="timeSliderProgress" src="timeSliderProgress.png" />
+ <element name="timeSliderRail" src="timeSliderRail.png" />
+ <element name="normalscreenButton" src="normalscreenButton.png" />
+ <element name="normalscreenButtonOver" src="normalscreenButtonOver.png" />
+ <element name="unmuteButton" src="unmuteButton.png" />
+ <element name="unmuteButtonOver" src="unmuteButtonOver.png" />
+ <element name="volumeSliderRail" src="divider.png" />
+ <element name="volumeSliderProgress" src="divider.png" />
+ </elements>
+ </component>
+
+ <component name="display">
+ <settings>
+ <setting name="bufferinterval" value="250" />
+ <setting name="bufferrotation" value="90" />
+ </settings>
+ <elements>
+ <element name="background" src="background.png" />
+ <element name="playIcon" src="playIcon.png" />
+ <element name="muteIcon" src="muteIcon.png" />
+ <element name="errorIcon" src="bufferIcon.png" />
+ <element name="bufferIcon" src="bufferIcon.png" />
+ </elements>
+ </component>
+
+ <component name="dock">
+ <settings>
+ <setting name="fontcolor" value="0xFFFFFF" />
+ </settings>
+ <elements>
+ <element name="button" src="button.png" />
+ </elements>
+ </component>
+
+ <component name="playlist">
+ <settings>
+ <setting name="fontcolor" value="0xEEEEEE" />
+ <setting name="overcolor" value="0xFFFFFF" />
+ <setting name="activecolor" value="0xFFFFFF" />
+ <setting name="backgroundcolor" value="0x333333" />
+ </settings>
+ <elements>
+ <element name="item" src="item.png" />
+ <element name="itemOver" src="itemOver.png" />
+ <element name="sliderCapBottom" src="sliderCapBottom.png" />
+ <element name="sliderCapTop" src="sliderCapTop.png" />
+ <element name="sliderRail" src="sliderRail.png" />
+ <element name="sliderThumb" src="sliderThumb.png" />
+ </elements>
+ </component>
+
+ <component name="sharing">
+ <elements>
+ <element name="embedIcon" src="embedIcon.png" />
+ <element name="embedScreen" src="embedScreen.png" />
+ <element name="shareIcon" src="shareIcon.png" />
+ <element name="shareScreen" src="shareScreen.png" />
+ </elements>
+ </component>
+
+ </components>
+
+</skin>
View
BIN assets/jwplayer/glow/playlist/item.png
Diff not rendered.
View
BIN assets/jwplayer/glow/playlist/itemOver.png
Diff not rendered.
View
BIN assets/jwplayer/glow/playlist/sliderCapBottom.png
Diff not rendered.
View
BIN assets/jwplayer/glow/playlist/sliderCapTop.png
Diff not rendered.
View
BIN assets/jwplayer/glow/playlist/sliderRail.png
Diff not rendered.
View
BIN assets/jwplayer/glow/playlist/sliderThumb.png
Diff not rendered.
View
BIN assets/jwplayer/glow/sharing/embedIcon.png
Diff not rendered.
View
BIN assets/jwplayer/glow/sharing/embedScreen.png
Diff not rendered.
View
BIN assets/jwplayer/glow/sharing/shareIcon.png
Diff not rendered.
View
BIN assets/jwplayer/glow/sharing/shareScreen.png
Diff not rendered.
View
BIN assets/jwplayer/player.swf
Binary file not shown.
View
1,119 atom.xml
@@ -0,0 +1,1119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <title><![CDATA[My Blog]]></title>
+ <link href="http://datawolf.github.com/atom.xml" rel="self"/>
+ <link href="http://datawolf.github.com/"/>
+ <updated>2013-04-01T20:52:53+08:00</updated>
+ <id>http://datawolf.github.com/</id>
+ <author>
+ <name><![CDATA[datawolf]]></name>
+ <email><![CDATA[wanglong@cse.buaa.edu.cn]]></email>
+ </author>
+ <generator uri="http://octopress.org/">Octopress</generator>
+
+
+ <entry>
+ <title type="html"><![CDATA[git 学习笔记 2]]></title>
+ <link href="http://datawolf.github.com/blog/2013/04/01/git-xue-xi-bi-ji-2/"/>
+ <updated>2013-04-01T14:14:00+08:00</updated>
+ <id>http://datawolf.github.com/blog/2013/04/01/git-xue-xi-bi-ji-2</id>
+ <content type="html"><![CDATA[<h1>历史</h1>
+
+<p>显示全部历史记录</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示版本历史,以及版本间的内容差异</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -p
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>只显示最近一个提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -1
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示最近的20个提交,以及版本间的内容差异</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -20 -p
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示最近6个小时的提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --since<span class="o">=</span><span class="s2">&quot;6 hours&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示两天前的提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --before<span class="o">=</span><span class="s2">&quot;2 days&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示比HEAD(当前检出分支的末稍)早三个提交的那个提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -1 HEAD~3
+</span><span class='line'><span class="nv">$ </span>git log -1 HEAD^^^
+</span><span class='line'><span class="nv">$ </span>git log -1 HEAD~1^^
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示两个版本直接的提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log &lt;start point&gt;...&lt;end point&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<!-- more -->
+
+
+<p>显示历史,每一个提交显示一行,包括提交注释的第一行</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --pretty<span class="o">=</span>oneline
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示改动行数统计</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --stat
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示改动文件的名称和状态</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --name-status
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示当前工作目录树和暂存区间的差别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示暂存区和版本库之间的差别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff --cached
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示工作目录树和版本库间的差别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff HEAD
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示工作目录树和版本库中某次提交版本之间的差别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff &lt;start point&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示版本库中两个版本之间的差别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff &lt;start point&gt; &lt;end point&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示差别的相关统计</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff --stat &lt;start point&gt; <span class="o">[</span>&lt;end point&gt;<span class="o">]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示文件中各个部分的修改者及相关提交信息</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git blame &lt;some file&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示文件中各部分的修改者及相关提交信息,包括在文件移动内容方面的情况</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git blame &lt;some file&gt;
+</span><span class='line'><span class="nv">$ </span>git blame -M &lt;some file&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示历史时,显示复制和粘贴信息</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -C -C -p -1 &lt;some point&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>远程版本库</h1>
+
+<p>克隆远程版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git clone &lt;some repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>克隆版本库,但只下载其中最近200个提交的历史记录</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git clone --depth 200 &lt;some repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在本地版本库中设置远程版本库的别名</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git remote add &lt;remote repository&gt; &lt;repository url&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示远程分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -r
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>基于远程分支创建本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch &lt;new branch&gt; &lt;remote branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>基于远程标签创建本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch &lt;new branch&gt; &lt;remote tag&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>从别名为<code>orgin</code>的远程版本库中取来修改变化,但不合并到本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git fetch
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>从任意的远程版本库中取来修改变化,但不合并到本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git fetch &lt;remote repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>从任意的远程版本库中取来修改变化,并合并到当前检出的本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git pull &lt;remote repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>从别名<code>orgin</code>的远程版本库中取来修改变化,并合并到当前检出的本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git pull
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把修改变化从本地分支推入远程版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push &lt;remote repository&gt; &lt;<span class="nb">local </span>branch&gt;:&lt;remote branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把修改变化从本地分支推入远程版本库中同名分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push &lt;remote repository&gt; &lt;<span class="nb">local </span>branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把修改变化从本地新建分支推入远程版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push &lt;remote repository&gt; &lt;<span class="nb">local </span>branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把修改变化推入别名为<code>orgin</code>的远程版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在远程版本库中删除分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push &lt;remote repository&gt; :&lt;remote branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在本地版本库中删除所有远程版本库中已不存在的分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git remote prune &lt;remote repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在本地版本库中删除某个远程版本库的简称,以及该远程版本库相关的分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git remote rm &lt;remote repository&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>操作示例</h1>
+
+<p>查看git日志</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log
+</span><span class='line'><span class="nv">$ </span>git log 7b1558c
+</span><span class='line'><span class="nv">$ </span>git log -10
+</span><span class='line'><span class="nv">$ </span>git log --since<span class="o">=</span><span class="s2">&quot;5 hours&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git log --since<span class="o">=</span><span class="s2">&quot;5 hours&quot;</span> -1
+</span><span class='line'><span class="nv">$ </span>git log 18f822e..0bb3dfb
+</span><span class='line'><span class="nv">$ </span>git log 18f822e..HEAD
+</span><span class='line'><span class="nv">$ </span>git log --pretty<span class="o">=</span>format:<span class="s2">&quot;%h %s&quot;</span> 1.0..HEAD
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看版本之间的差异</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff 18f822e
+</span><span class='line'><span class="nv">$ </span>git diff --stat 1.0
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查明该向谁问责</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git blame hello.html
+</span><span class='line'><span class="nv">$ </span>git blame -L 12,13 hello.html
+</span><span class='line'><span class="nv">$ </span>git blame -L 12,+2 hello.html
+</span><span class='line'><span class="nv">$ </span>git blame -L 12,-2 hello.html
+</span><span class='line'><span class="nv">$ </span>git blame -: <span class="s2">&quot;/&lt;\/body&gt;/&quot;</span>,+2 hello.html
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>复位操作,将版本库复位到<code>HEAD</code>之前的那个版本了</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git reset --hard HEAD^
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>显示远程分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+<span class='line-number'>9</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch
+</span><span class='line'>* master
+</span><span class='line'><span class="nv">$ </span>git branch -r
+</span><span class='line'> origin/HEAD -&gt; origin/master
+</span><span class='line'> origin/about
+</span><span class='line'> origin/alternate
+</span><span class='line'> origin/contacts
+</span><span class='line'> origin/master
+</span><span class='line'> origin/new
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>更新远程分支,但不会把远程分支上的修改合并到本地分支上。</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git fetch
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>取来远程分支并且合并,需要两个参数,一个是远程版本库名称,另一个需要拖入的远程分支名称</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git pull
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>推入改动,调用不带参数的<code>git push</code>命令时,git会推入到默认版本库origin中,并把本地版本库中当前所在分支的
+变更推入到远程版本库对应的分支上。</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>将本地分支上<code>mybranch</code>上的提交推入远程版本库的主分支上</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git push origin mybranch:master
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>添加新的远程版本库,必须有相应的权限</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[git 学习笔记 1]]></title>
+ <link href="http://datawolf.github.com/blog/2013/04/01/git-xue-xi-bi-ji-1/"/>
+ <updated>2013-04-01T09:37:00+08:00</updated>
+ <id>http://datawolf.github.com/blog/2013/04/01/git-xue-xi-bi-ji-1</id>
+ <content type="html"><![CDATA[<h1>安装和初始化</h1>
+
+<p>配置全局用户名和电子邮件地址</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global user.name <span class="s2">&quot;yourname&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git config --global user.email <span class="s2">&quot;yourname@mail.com&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>为特定版本库配置用户名和电子邮件</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/repo
+</span><span class='line'><span class="nv">$ </span>git config user.name <span class="s2">&quot;yourname&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git config user.email <span class="s2">&quot;yourname@mail.com&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看配置</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global --list
+</span><span class='line'>user.name<span class="o">=</span>yourname
+</span><span class='line'>user.email<span class="o">=</span>yourname@mail.com
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在命令行中使用不同的颜色显示不同类型的内容,需要设置<code>color.ui</code>的值为<code>auto</code>或者<code>always</code></p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global color.ui <span class="s2">&quot;auto&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>初始化新版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>mkdir /path/to/repo
+</span><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/repo
+</span><span class='line'><span class="nv">$ </span>git init
+</span><span class='line'><span class="nv">$ </span>git add .
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;initial import&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>克隆版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git clone &lt;repository url&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>将目录中的内容纳入到git版本控制</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/existing/directory
+</span><span class='line'><span class="nv">$ </span>git init
+</span><span class='line'><span class="nv">$ </span>git add .
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;initial import of some project&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<!-- more -->
+
+
+<p>在本地版本库中设置远程版本库的别名</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git remote add &lt;remote repository&gt; &lt;repository url&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>日常操作</h1>
+
+<p>添加新文件或暂存已有文件上的改动,然后提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add &lt;some file&gt;
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;&lt;some message&gt;&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>替换已有文件上的部分修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add -p <span class="o">[</span>&lt;some file&gt; <span class="o">[</span>&lt;some file&gt; <span class="o">[</span>and so on<span class="o">]]]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>使用交互式添加文件</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add -i
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>暂存已纳入git版本控制之下的文件的修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add -u <span class="o">[</span>&lt;some file&gt; <span class="o">[</span>&lt;some file&gt;<span class="o">]]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>提交已纳入git版本控制之下的文件的所有修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;&lt;some message&gt;&quot;</span> -a
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>清除工作目录树中的修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout HEAD &lt;some file&gt; <span class="o">[</span>&lt;some file&gt;<span class="o">]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>取消已暂存但尚未提交的修改的暂存标识</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git reset HEAD &lt;some file&gt; <span class="o">[</span>&lt;some file&gt;<span class="o">]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>修复上一次提交中的问题,改动相关文件并暂存……</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;&lt;some message&gt;&quot;</span> --amend
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>修复上一次提交中的内容,并复用上次的提交注释</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -C HEAD --amend
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>分支</h1>
+
+<p>列出本地分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>列出远程分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -r
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>列出所有分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -a
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>基于当前分支(的末稍)创建新分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch &lt;new branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>检出另一条分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout &lt;new branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>基于当前分支创建新分支,同时检出该分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout -b &lt;new branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>基于另一个起点,创建新分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch &lt;some existing branch&gt; &lt;start point&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>创建同名新分支,覆盖已有分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -f &lt;some existing branch&gt; <span class="o">[</span>&lt;start point&gt;<span class="o">]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>移动或重命名分支
+1、只有当<new branch name>不存在时</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout -m &lt;existing branch name&gt; &lt;new branch name&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>2、如果<new branch name>以存在,就覆盖她</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout -M &lt;existing branch name&gt; &lt;new branch name&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把另一条分支合并到当前分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git merge &lt;some branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>合并但不提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git merge --no-commit &lt;some branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>拣选合并,并且提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git cherry-pick &lt;commit name&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>拣选合并,但不提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git cherry-pick -n &lt;commit name&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>把一条分支上的内容压和到另一条分支(上的一个提交)</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git merge --squash &lt;some branch&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>删除分支</p>
+
+<p>1、进当欲删除分支已经合并到当前分支时</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -d &lt;branch to delete&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>2、不论欲删除分支是否已合并到当前分支上</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -D &lt;branch to delete&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>举例说明</h1>
+
+<p>添加一个文件index.html,使用<code>git add</code>命令将该文件添加到版本库的索引</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add index.html
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>使用<code>git commit</code>命令提交,即创建一个<code>提交记录</code></p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add in hello world HTML&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看提交的相关信息</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在项目中工作,修改了index.html,显示工作树的状态</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git status
+</span><span class='line'><span class="nv">$ </span>git add index.html
+</span><span class='line'><span class="nv">$ </span>git status
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Git可以接受任意多次的留言的输入,每一次另起一段</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add xxx to xxx&quot;</span> <span class="se">\</span>
+</span><span class='line'> -m <span class="s2">&quot;this is the second commit document&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>提交所有的修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -a
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Git 输出一个提交条目或者多个提交条目,使用<code>-num</code>参数</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log -1
+</span><span class='line'><span class="nv">$ </span>git log -2
+</span><span class='line'><span class="nv">$ </span>git log -5
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>创建一个分支,需要两个参数,第一个是新分支名称,第二个是父分支名称</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch RB_1.0 master
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>切换到分支RB_1.0</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout RB_1.0
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>处理发布时,打标签命令。需要两个参数,第一个是标签的名称,第二个是分支的末稍</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git tag 1.0 RB_1.0
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看版本库中的标签列表</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git tag
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>分支合并,使用变基命令,<code>git rebase</code> 跟一个参数,指的是变基到哪一条分支的末稍。
+将master分支变基到RB_1.0分支的末稍</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout master
+</span><span class='line'><span class="nv">$ </span>git rebase RB_1.0
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>删除分支RB_1.0</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -d RB_1.0
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>删除分支后,只是删除了分支的名称,不会删除分支上的任何实际内容,可以使用标签来找到从标签
+到版本树起点的一连串的提交记录</p>
+
+<p>打补丁时创建分支的过程</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch RB_1.0.1 1.0
+</span><span class='line'><span class="nv">$ </span>git checkout RB_1.0.1
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>修改完后在合并到分支1.0中。</p>
+
+<p>快速产看历史记录</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git log --pretty<span class="o">=</span>oneline
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>为代码发布创建归档文件</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git archive --format<span class="o">=</span>tar <span class="se">\</span>
+</span><span class='line'> --prefix<span class="o">=</span>mysite-1.0/ 1.0 <span class="se">\</span>
+</span><span class='line'> | gzip &gt; mysite-1.0.tar.gz
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>或者</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git archive --format<span class="o">=</span>zip <span class="se">\</span>
+</span><span class='line'> --prefix<span class="o">=</span>mysite-1.0/ 1.0 <span class="se">\</span>
+</span><span class='line'> &gt; mysite-1.0.zip
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>克隆远程版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git clone http://github.com/tswicegood/mysite.git mysite-remote
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>提交修改有三种方法</p>
+
+<p>1、先暂存,在提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add some-file
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;changes to some-file&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>2、直接提交,提交工作目录树中的所有修改。</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;changes to some-file&quot;</span> -a
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>3、直接修改,提交工作目录树中指定的修改。</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;changes to some-file&quot;</span> some-file
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>将命令<code>git commit</code>简写为<code>git ci</code>:</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global alias.ci <span class="s2">&quot;commit&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看工作目录树中所有的改动</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git status
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>比较工作目录树与暂存区之间的区别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>比较暂存区和版本库直接的区别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff --cached
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>比较工作目录树(包括暂存和未暂存的修改)与版本库中的区别</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git diff HEAD
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p><code>HEAD</code>指的是当前所在分支末稍的最新提交。</p>
+
+<p>文件重命名与移动</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git mv index.html hello.html
+</span><span class='line'><span class="nv">$ </span>git status
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;rename to more appropriate name&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>忽略文件</p>
+
+<p>1、可以在工作目录树下设置文件<code>.gitignore</code>来设置版本库级别的忽略。</p>
+
+<p>2、可以通过编辑<code>.git/info/exclude</code>来设置本地级的忽略。</p>
+
+<p>修改分支的名称,<code>-m</code>不会覆盖已有的分支名称,所以新分支必须是唯一的。</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -m master mymaster
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>创建新分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch new
+</span><span class='line'><span class="nv">$ </span>git branch
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>检出刚才创建的分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout new
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>用快捷方法创建新分支<code>alternate</code></p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout -b alternate master
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>合并分支间的修改</p>
+
+<p>1、直接合并</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch
+</span><span class='line'>* alternate
+</span><span class='line'> master
+</span><span class='line'><span class="nv">$ </span>touch about.html
+</span><span class='line'><span class="nv">$ </span>git add about.html
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add the skeleton of an about page&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git checkout master
+</span><span class='line'><span class="nv">$ </span>git merge alternate
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>2、压合合并</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+<span class='line-number'>8</span>
+<span class='line-number'>9</span>
+<span class='line-number'>10</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git checkout -b contact master
+</span><span class='line'><span class="nv">$ </span>git add contact.html
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add contact file with email&quot;</span>
+</span><span class='line'><span class="c">#修改contact.html文件</span>
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add secondary email&quot;</span> -a
+</span><span class='line'><span class="nv">$ </span>git checkout master
+</span><span class='line'><span class="nv">$ </span>git merge --squash contact
+</span><span class='line'><span class="nv">$ </span>git status
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;add contact&quot;</span> <span class="se">\</span>
+</span><span class='line'> -m <span class="s2">&quot;has primary and secondary email.&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>3、拣选合并<code>git cherry-pick</code></p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git cherry-pick 9826311
+</span><span class='line'><span class="nv">$ </span>git cherry-pick -n 9826311
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>删除分支,<code>-d</code>删除合并了的分支,<code>-D</code>删除未合并的分支</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git branch -d about2
+</span><span class='line'><span class="nv">$ </span>git branch -D about
+</span></code></pre></td></tr></table></div></figure>
+
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Zombie Ninjas Attack: A survivor's retrospective]]></title>
+ <link href="http://datawolf.github.com/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/"/>
+ <updated>2013-03-29T16:24:00+08:00</updated>
+ <id>http://datawolf.github.com/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective</id>
+ <content type="html"><![CDATA[<figure class='code'><figcaption><span>Discover if a number is prime</span><a href='http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/'>Source Article</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">class</span> <span class="nc">Fixnum</span>
+</span><span class='line'> <span class="k">def</span> <span class="nf">prime?</span>
+</span><span class='line'> <span class="p">(</span><span class="s1">&#39;1&#39;</span> <span class="o">*</span> <span class="nb">self</span><span class="p">)</span> <span class="o">!~</span> <span class="sr">/^1?$|^(11+?)\1+$/</span>
+</span><span class='line'> <span class="k">end</span>
+</span><span class='line'><span class="k">end</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<!--more-->
+
+
+<p>code test</p>
+
+<figure class='code'><figcaption><span>世界, 你好!</span><a href='http://wiki.l-cloud.org/'>源代码</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+</pre></td><td class='code'><pre><code class='c'><span class='line'><span class="cp">#include &lt;stdio.h&gt;</span>
+</span><span class='line'>
+</span><span class='line'><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">**</span> <span class="n">argv</span><span class="p">)</span>
+</span><span class='line'><span class="p">{</span>
+</span><span class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;hello world!</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">);</span>
+</span><span class='line'> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</span><span class='line'><span class="p">}</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<div><script src='https://gist.github.com/996818.js'></script>
+<noscript><pre><code></code></pre></noscript></div>
+
+
+<p>code test 1</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>Awesome code snippet</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<blockquote><p>Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.</p></blockquote>
+
+
+<h2>What is Octopress?</h2>
+
+<p>Octopress is <a href="https://github.com/mojombo/jekyll">Jekyll</a> blogging at its finest.</p>
+
+<ol>
+<li><strong>Octopress sports a clean responsive theme</strong> written in semantic HTML5, focused on readability and friendliness toward mobile devices.</li>
+<li><strong>Code blogging is easy and beautiful.</strong> Embed code (with <a href="http://ethanschoonover.com/solarized">Solarized</a> styling) in your posts from gists, jsFiddle or from your filesystem.</li>
+<li><strong>Third party integration is simple</strong> with built-in support for Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics.</li>
+<li><strong>It&#8217;s easy to use.</strong> A collection of rake tasks simplifies development and makes deploying a cinch.</li>
+<li><strong>Ships with great plug-ins</strong> some original and others from the Jekyll community &mdash; tested and improved.</li>
+</ol>
+
+
+<h2>Documentation</h2>
+
+<p>Check out <a href="http://octopress.org/docs">Octopress.org</a> for guides and documentation.</p>
+
+<h2>Contributing</h2>
+
+<p><a href="https://travis-ci.org/imathis/octopress"><img src="https://travis-ci.org/imathis/octopress.png?branch=master" alt="Build Status" /></a></p>
+
+<p>We love to see people contributing to Octopress, whether it&#8217;s a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a <a href="https://github.com/imathis/octopress/wiki/3rd-party-plugins">list of 3rd party plug-ins</a>, where you can link your own Octopress plug-in repositories. For the future, we&#8217;re thinking about ways to easier add them them into our main releases.</p>
+
+<h2>License</h2>
+
+<p>(The MIT License)</p>
+
+<p>Copyright © 2009-2013 Brandon Mathis</p>
+
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
+
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+
+<p>THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
+
+<h4>If you want to be awesome.</h4>
+
+<ul>
+<li>Proudly display the &#8216;Powered by Octopress&#8217; credit in the footer.</li>
+<li>Add your site to the Wiki so we can watch the community grow.</li>
+</ul>
+
+]]></content>
+ </entry>
+
+</feed>
View
356 blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/index.html
@@ -0,0 +1,356 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>Zombie Ninjas Attack: A survivor's retrospective - My Blog</title>
+ <meta name="author" content="datawolf">
+
+
+ <meta name="description" content="Discover if a number is primeSource Article1
+2
+3
+4
+5
+class Fixnum def prime? (&#39;1&#39; * self) !~ /^1?$|^(11+?)\1+$/ end
+end code test 世界, 你好!源代码1 &hellip;">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://datawolf.github.com/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link href="/atom.xml" rel="alternate" title="My Blog" type="application/atom+xml">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+ <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">My Blog</a></h1>
+
+ <h2>Programming Your Future!</h2>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:datawolf.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article class="hentry" role="article">
+
+ <header>
+
+ <h1 class="entry-title">Zombie Ninjas Attack: A Survivor's Retrospective</h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-03-29T16:24:00+08:00" pubdate data-updated="true">Mar 29<span>th</span>, 2013</time>
+
+ | <a href="#disqus_thread">Comments</a>
+
+ </p>
+
+ </header>
+
+
+<div class="entry-content"><figure class='code'><figcaption><span>Discover if a number is prime</span><a href='http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/'>Source Article</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">class</span> <span class="nc">Fixnum</span>
+</span><span class='line'> <span class="k">def</span> <span class="nf">prime?</span>
+</span><span class='line'> <span class="p">(</span><span class="s1">&#39;1&#39;</span> <span class="o">*</span> <span class="nb">self</span><span class="p">)</span> <span class="o">!~</span> <span class="sr">/^1?$|^(11+?)\1+$/</span>
+</span><span class='line'> <span class="k">end</span>
+</span><span class='line'><span class="k">end</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<!--more-->
+
+
+<p>code test</p>
+
+<figure class='code'><figcaption><span>世界, 你好!</span><a href='http://wiki.l-cloud.org/'>源代码</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+</pre></td><td class='code'><pre><code class='c'><span class='line'><span class="cp">#include &lt;stdio.h&gt;</span>
+</span><span class='line'>
+</span><span class='line'><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">**</span> <span class="n">argv</span><span class="p">)</span>
+</span><span class='line'><span class="p">{</span>
+</span><span class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;hello world!</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">);</span>
+</span><span class='line'> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
+</span><span class='line'><span class="p">}</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<div><script src='https://gist.github.com/996818.js'></script>
+<noscript><pre><code></code></pre></noscript></div>
+
+
+<p>code test 1</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>Awesome code snippet</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<blockquote><p>Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.</p></blockquote>
+
+
+<h2>What is Octopress?</h2>
+
+<p>Octopress is <a href="https://github.com/mojombo/jekyll">Jekyll</a> blogging at its finest.</p>
+
+<ol>
+<li><strong>Octopress sports a clean responsive theme</strong> written in semantic HTML5, focused on readability and friendliness toward mobile devices.</li>
+<li><strong>Code blogging is easy and beautiful.</strong> Embed code (with <a href="http://ethanschoonover.com/solarized">Solarized</a> styling) in your posts from gists, jsFiddle or from your filesystem.</li>
+<li><strong>Third party integration is simple</strong> with built-in support for Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics.</li>
+<li><strong>It&#8217;s easy to use.</strong> A collection of rake tasks simplifies development and makes deploying a cinch.</li>
+<li><strong>Ships with great plug-ins</strong> some original and others from the Jekyll community &mdash; tested and improved.</li>
+</ol>
+
+
+<h2>Documentation</h2>
+
+<p>Check out <a href="http://octopress.org/docs">Octopress.org</a> for guides and documentation.</p>
+
+<h2>Contributing</h2>
+
+<p><a href="https://travis-ci.org/imathis/octopress"><img src="https://travis-ci.org/imathis/octopress.png?branch=master" alt="Build Status" /></a></p>
+
+<p>We love to see people contributing to Octopress, whether it&#8217;s a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a <a href="https://github.com/imathis/octopress/wiki/3rd-party-plugins">list of 3rd party plug-ins</a>, where you can link your own Octopress plug-in repositories. For the future, we&#8217;re thinking about ways to easier add them them into our main releases.</p>
+
+<h2>License</h2>
+
+<p>(The MIT License)</p>
+
+<p>Copyright © 2009-2013 Brandon Mathis</p>
+
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
+
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+
+<p>THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
+
+<h4>If you want to be awesome.</h4>
+
+<ul>
+<li>Proudly display the &#8216;Powered by Octopress&#8217; credit in the footer.</li>
+<li>Add your site to the Wiki so we can watch the community grow.</li>
+</ul>
+
+</div>
+
+
+ <footer>
+ <p class="meta">
+
+
+
+<span class="byline author vcard">Posted by <span class="fn">datawolf</span></span>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-03-29T16:24:00+08:00" pubdate data-updated="true">Mar 29<span>th</span>, 2013</time>
+
+
+<span class="categories">
+
+ <a class='category' href='/blog/categories/saas/'>Saas</a>
+
+</span>
+
+
+ </p>
+
+ <div class="sharing">
+
+
+
+</div>
+
+
+ <p class="meta">
+
+
+ <a class="basic-alignment right" href="/blog/2013/04/01/git-xue-xi-bi-ji-1/" title="Next Post: git 学习笔记 1">git 学习笔记 1 &raquo;</a>
+
+ </p>
+ </footer>
+</article>
+
+ <section>
+ <h1>Comments</h1>
+ <div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+</div>
+ </section>
+
+</div>
+
+<aside class="sidebar">
+
+ <section>
+ <h1>About Me</h1>
+ <p>A little something about me.</p>
+</section>
+<section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/blog/2013/04/01/git-xue-xi-bi-ji-2/">git 学习笔记 2</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2013/04/01/git-xue-xi-bi-ji-1/">git 学习笔记 1</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/">Zombie Ninjas Attack: A survivor's retrospective</a>
+ </li>
+
+ </ul>
+</section>
+
+<section>
+ <h1>GitHub Repos</h1>
+ <ul id="gh_repos">
+ <li class="loading">Status updating...</li>
+ </ul>
+
+ <script type="text/javascript">
+ $(document).ready(function(){
+ if (!window.jXHR){
+ var jxhr = document.createElement('script');
+ jxhr.type = 'text/javascript';
+ jxhr.src = '/javascripts/libs/jXHR.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(jxhr, s);
+ }
+
+ github.showRepos({
+ user: 'datawolf',
+ count: 10,
+ skip_forks: true,
+ target: '#gh_repos'
+ });
+ });
+ </script>
+ <script src="/javascripts/github.js" type="text/javascript"> </script>
+</section>
+
+
+<section>
+ <h1>On Delicious</h1>
+ <div id="delicious"></div>
+ <script type="text/javascript" src="http://feeds.delicious.com/v2/json/datawolf?count=3&amp;sort=date&amp;callback=renderDeliciousLinks"></script>
+ <p><a href="http://delicious.com/datawolf">My Delicious Bookmarks &raquo;</a></p>
+</section>
+
+
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2013 - datawolf -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+<script type="text/javascript">
+ var disqus_shortname = 'datawolf';
+
+
+ // var disqus_developer = 1;
+ var disqus_identifier = 'http://datawolf.github.com/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/';
+ var disqus_url = 'http://datawolf.github.com/blog/2013/03/29/zombie-ninjas-attack-a-survivors-retrospective/';
+ var disqus_script = 'embed.js';
+
+ (function () {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ }());
+</script>
+
+
+
+
+
+
+
+
+
+
+
+</body>
+</html>
View
865 blog/2013/04/01/git-xue-xi-bi-ji-1/index.html
@@ -0,0 +1,865 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>git 学习笔记 1 - My Blog</title>
+ <meta name="author" content="datawolf">
+
+
+ <meta name="description" content="安装和初始化 配置全局用户名和电子邮件地址 1
+2
+$ git config --global user.name &quot;yourname&quot;
+$ git config --global user.email &quot;yourname@mail.com&quot; &hellip;">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://datawolf.github.com/blog/2013/04/01/git-xue-xi-bi-ji-1">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link href="/atom.xml" rel="alternate" title="My Blog" type="application/atom+xml">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+ <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">My Blog</a></h1>
+
+ <h2>Programming Your Future!</h2>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:datawolf.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article class="hentry" role="article">
+
+ <header>
+
+ <h1 class="entry-title">Git 学习笔记 1</h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2013-04-01T09:37:00+08:00" pubdate data-updated="true">Apr 1<span>st</span>, 2013</time>
+
+ | <a href="#disqus_thread">Comments</a>
+
+ </p>
+
+ </header>
+
+
+<div class="entry-content"><h1>安装和初始化</h1>
+
+<p>配置全局用户名和电子邮件地址</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global user.name <span class="s2">&quot;yourname&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git config --global user.email <span class="s2">&quot;yourname@mail.com&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>为特定版本库配置用户名和电子邮件</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/repo
+</span><span class='line'><span class="nv">$ </span>git config user.name <span class="s2">&quot;yourname&quot;</span>
+</span><span class='line'><span class="nv">$ </span>git config user.email <span class="s2">&quot;yourname@mail.com&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>查看配置</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global --list
+</span><span class='line'>user.name<span class="o">=</span>yourname
+</span><span class='line'>user.email<span class="o">=</span>yourname@mail.com
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>在命令行中使用不同的颜色显示不同类型的内容,需要设置<code>color.ui</code>的值为<code>auto</code>或者<code>always</code></p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global color.ui <span class="s2">&quot;auto&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>初始化新版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>mkdir /path/to/repo
+</span><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/repo
+</span><span class='line'><span class="nv">$ </span>git init
+</span><span class='line'><span class="nv">$ </span>git add .
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;initial import&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>克隆版本库</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git clone &lt;repository url&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>将目录中的内容纳入到git版本控制</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span><span class="nb">cd</span> /path/to/existing/directory
+</span><span class='line'><span class="nv">$ </span>git init
+</span><span class='line'><span class="nv">$ </span>git add .
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;initial import of some project&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<!-- more -->
+
+
+<p>在本地版本库中设置远程版本库的别名</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git remote add &lt;remote repository&gt; &lt;repository url&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<h1>日常操作</h1>
+
+<p>添加新文件或暂存已有文件上的改动,然后提交</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add &lt;some file&gt;
+</span><span class='line'><span class="nv">$ </span>git commit -m <span class="s2">&quot;&lt;some message&gt;&quot;</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>替换已有文件上的部分修改</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add -p <span class="o">[</span>&lt;some file&gt; <span class="o">[</span>&lt;some file&gt; <span class="o">[</span>and so on<span class="o">]]]</span>
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>使用交互式添加文件</p>
+
+<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git add -i
+</span></code></pre></td></tr></table></div></figure>