diff --git a/basic/index.html b/basic/index.html index 9a2f3d3..23455c8 100644 --- a/basic/index.html +++ b/basic/index.html @@ -612,7 +612,7 @@

git reset HEAD - undo the last commit and unstage the files + unstage files from index and reset pointer to HEAD

First, you can use it to unstage something that has been @@ -691,7 +691,7 @@

git reset --soft - undo the last commit + moves HEAD to specified commit reference, index and staging are untouched

The first thing git reset does is undo the last @@ -721,11 +721,12 @@

git reset --hard - undo the last commit, unstage files AND undo any changes in the working directory + unstage files AND undo any changes in the working directory since last commit

The third option is to go --hard and make your working - directory look like the index, unstage files and undo the last commit. + directory look like the index, unstage files and undo any changes made + since the last commit. This is the most dangerous option and not working directory safe. Any changes not in the index or have not been commited will be lost.

@@ -752,7 +753,8 @@

In the above example, while we had both changes ready to commit and ready to stage, a git reset --hard wiped them out. - On top of that, the last commit has been undone.

+ The working tree and staging area are reset to the tip of the current + branch or HEAD.

You can replace HEAD with a commit SHA-1 or another parent reference to reset to that specific point.