Skip to content

Commit e97fc7e

Browse files
author
Matthew McCullough
committed
Merge pull request #73 from adailey14/63-correct-reset-notes
Rebase of pull request 64 onto latest gh-pages
2 parents 9cdec2f + 450a1c1 commit e97fc7e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

basic/index.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ <h2>
612612

613613
<h4>
614614
git reset HEAD
615-
<small>undo the last commit and unstage the files</small>
615+
<small>unstage files from index and reset pointer to HEAD</small>
616616
</h4>
617617

618618
<p>First, you can use it to unstage something that has been
@@ -691,7 +691,7 @@ <h4>
691691

692692
<h4>
693693
git reset --soft
694-
<small>undo the last commit</small>
694+
<small>moves HEAD to specified commit reference, index and staging are untouched</small>
695695
</h4>
696696

697697
<p>The first thing <code>git reset</code> does is undo the last
@@ -721,11 +721,12 @@ <h4>
721721

722722
<h4>
723723
git reset --hard
724-
<small>undo the last commit, unstage files AND undo any changes in the working directory</small>
724+
<small>unstage files AND undo any changes in the working directory since last commit</small>
725725
</h4>
726726

727727
<p>The third option is to go <code>--hard</code> and make your working
728-
directory look like the index, unstage files and undo the last commit.
728+
directory look like the index, unstage files and undo any changes made
729+
since the last commit.
729730
This is the most dangerous option and not working directory safe. Any
730731
changes not in the index or have not been commited will be lost.</p>
731732

@@ -752,7 +753,8 @@ <h4>
752753

753754
<p>In the above example, while we had both changes ready to commit and
754755
ready to stage, a <code>git reset --hard</code> wiped them out.
755-
On top of that, the last commit has been undone.</p>
756+
The working tree and staging area are reset to the tip of the current
757+
branch or HEAD.</p>
756758

757759
<p>You can replace <code>HEAD</code> with a commit SHA-1 or another
758760
parent reference to reset to that specific point.</p>

0 commit comments

Comments
 (0)