@git / git-reference / commits / 450a1c1

Clarify where git reset moves HEAD, affect on stage, index

Soon Van committed May 22, 2013 at 13:56 UTC 450a1c1b1890ef519a5dc43980a2b70c2b7dda45
1 file changed +3 -3
basic/index.html
+3 -3
@@ -691,7 +691,7 @@ M hello.rb
691
692 <h4>
693 git reset --soft
694 - <small>moves what HEAD points to, index and staging are untouched</small>
694 + <small>moves HEAD to specified commit reference, index and staging are untouched</small>
695 </h4>
696
697 <p>The first thing <code>git reset</code> does is undo the last
@@ -753,8 +753,8 @@ nothing to commit (working directory clean)
753
754 <p>In the above example, while we had both changes ready to commit and
755 ready to stage, a <code>git reset --hard</code> wiped them out.
756 - The working tree and stage are now reset to the point just after the
757 - commit pointed at by HEAD.</p>
756 + The working tree and staging area are reset to the tip of the current
757 + branch or HEAD.</p>
758
759 <p>You can replace <code>HEAD</code> with a commit SHA-1 or another
760 parent reference to reset to that specific point.</p>