Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' into production

  • Loading branch information...
commit 04f67628f66d172aa86cf1a84612adb85da21b2f 2 parents 54dd791 + f3b4c70
Mark Lodato authored October 02, 2011
1  Makefile
@@ -4,6 +4,7 @@ PDF2PNG = convert -density 88
4 4
 
5 5
 FILES := \
6 6
     basic-usage \
  7
+    basic-usage-2 \
7 8
     checkout-after-detached \
8 9
     checkout-b-detached \
9 10
     checkout-branch \
25  basic-usage-2.tex
... ...
@@ -0,0 +1,25 @@
  1
+\input{common.tex}
  2
+\geometry{papersize={25\g,9\g}}
  3
+\begin{document}
  4
+\begin{tikzpicture}[main]
  5
+    \boundingbox
  6
+    \historynode[0,2]
  7
+    \indexnode[0,0]
  8
+    \worknode[0,-2]
  9
+
  10
+    \path [line]
  11
+        (work.north east)
  12
+            edge node[cmd] {}
  13
+        (index.south east)
  14
+        (work.north east)
  15
+            edge node[cmd] {git commit (\emph{files}|-a)}
  16
+        (head.south east)
  17
+        (head.south west)
  18
+            edge node[cmd] {git checkout HEAD -- \emph{files}}
  19
+        (work.north west)
  20
+        (head.south west)
  21
+            edge
  22
+        (index.north west)
  23
+        ;
  24
+\end{tikzpicture}
  25
+\end{document}
25  index-en.html
@@ -69,8 +69,8 @@ <h2 id="basic-usage">Basic Usage</h2>
69 69
     command to "undo" a <code>git add <em>files</em></code>.  You can also
70 70
     <code>git reset</code> to unstage everything.</li>
71 71
 
72  
-    <li><code>git checkout -- <em>files</em></code> copies files from the
73  
-    stage to the working directory.  Use this to throw away local
  72
+    <li><code>git checkout -- <em>files</em></code> copies <em>files</em> from 
  73
+    the stage to the working directory.  Use this to throw away local
74 74
     changes.</li>
75 75
 
76 76
   </ul>
@@ -79,6 +79,27 @@ <h2 id="basic-usage">Basic Usage</h2>
79 79
   <code>git add -p</code> instead of (or in addition to) specifying particular
80 80
   files to interactively choose which hunks copy.</p>
81 81
 
  82
+  <p>It is also possible to jump over the stage and check out files directly 
  83
+  from the history or commit files without staging first.</p>
  84
+
  85
+  <div class="center"><img src='basic-usage-2.svg.png'></div>
  86
+
  87
+  <ul>
  88
+
  89
+    <li><code>git commit -a </code> is equivalent to running <tt>git add</tt> 
  90
+    on all filenames that existed in the latest commit, and then running 
  91
+    <tt>git commit</tt>.</li>
  92
+
  93
+    <li><code>git commit <em>files</em></code> creates a new commit containing 
  94
+    the contents of the latest commit, plus a snapshot of <em>files</em> taken 
  95
+    from the working directory.  Additionally, <em>files</em> are copied to 
  96
+    the stage.</li>
  97
+
  98
+    <li><code>git checkout HEAD -- <em>files</em></code> copies <em>files</em> 
  99
+    from the latest commit to both the stage and the working directory.</li>
  100
+
  101
+  </ul>
  102
+
82 103
   <h2 id="conventions">Conventions</h2>
83 104
 
84 105
   <p>In the rest of this document, we will use graphs of the following

0 notes on commit 04f6762

Please sign in to comment.
Something went wrong with that request. Please try again.