Code

Merge branch 'nd/maint-work-tree-fix' into maint
[git.git] / Documentation / git-commit.txt
index 63599d382827e69341983a80d64d53dd18e9ac4e..d4bfd49ce12ebe8f7b172d6f682d64ccbce66087 100644 (file)
@@ -19,6 +19,7 @@ Use 'git commit' to store the current contents of the index in a new
 commit along with a log message describing the changes you have made.
 
 The content to be added can be specified in several ways:
+
 1. by using gitlink:git-add[1] to incrementally "add" changes to the
    index before using the 'commit' command (Note: even modified
    files must be "added");
@@ -153,10 +154,13 @@ EXAMPLES
 --------
 When recording your own work, the contents of modified files in
 your working tree are temporarily stored to a staging area
-called the "index" with gitlink:git-add[1].  Removal
-of a file is staged with gitlink:git-rm[1].  After building the
-state to be committed incrementally with these commands, `git
-commit` (without any pathname parameter) is used to record what
+called the "index" with gitlink:git-add[1].  A file can be
+reverted back, only in the index but not in the working tree,
+to that of the last commit with `git-reset HEAD -- <file>`,
+which effectively reverts `git-add` and prevents the changes to
+this file from participating in the next commit.  After building
+the state to be committed incrementally with these commands,
+`git commit` (without any pathname parameter) is used to record what
 has been staged so far.  This is the most basic form of the
 command.  An example: