diff options
author | Soon Van <cog@randomecho.com> | 2013-05-22 06:06:56 +0400 |
---|---|---|
committer | Andrew Dailey <andrew.dailey@hotelsathome.com> | 2014-01-08 22:35:01 +0400 |
commit | 96186d05ff119871376ee81f80d9a8ef0e3c0c5a (patch) | |
tree | 0e5f1e0d60e7f6631f34ffc47cf1aec894d02bcf | |
parent | 9cdec2fac586f2b64c0163364246f410c51e94af (diff) |
git reset does not affect commit, but changes index, stage to them
Clear up what happens when you run `git reset` in that it does
not affect the commit, or allow to change it per se, but that it
affects what is sitting in the index and staging as pointed to
by the commit or HEAD pointer mentioned.
Fixes #63
-rw-r--r-- | basic/index.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/basic/index.html b/basic/index.html index 0904da9..100c11d 100644 --- a/basic/index.html +++ b/basic/index.html @@ -612,7 +612,7 @@ Further paragraphs come after blank lines. <h4> git reset HEAD - <small>undo the last commit and unstage the files</small> + <small>unstage files from index and reset pointer to HEAD</small> </h4> <p>First, you can use it to unstage something that has been @@ -691,7 +691,7 @@ M hello.rb <h4> git reset --soft - <small>undo the last commit</small> + <small>moves what HEAD points to, index and staging are untouched</small> </h4> <p>The first thing <code>git reset</code> does is undo the last @@ -721,11 +721,12 @@ nothing to commit (working directory clean) <h4> git reset --hard - <small>undo the last commit, unstage files AND undo any changes in the working directory</small> + <small>unstage files AND undo any changes in the working directory since last commit</small> </h4> <p>The third option is to go <code>--hard</code> 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.</p> @@ -752,7 +753,8 @@ nothing to commit (working directory clean) <p>In the above example, while we had both changes ready to commit and ready to stage, a <code>git reset --hard</code> wiped them out. - On top of that, the last commit has been undone.</p> + The working tree and stage are now reset to the point just after the + commit pointed at by HEAD.</p> <p>You can replace <code>HEAD</code> with a commit SHA-1 or another parent reference to reset to that specific point.</p> |