Skip to content

Commit af9a70c

Browse files
committed
Merge branch 'nd/commit-p-doc'
Documentation for "git commit" was updated to clarify that "commit -p <paths>" adds to the current contents of the index to come up with what to commit. * nd/commit-p-doc: git-commit.txt: clarify --patch mode with pathspec
2 parents 630e05c + 7431596 commit af9a70c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Documentation/git-commit.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ The content to be added can be specified in several ways:
2929
2. by using 'git rm' to remove files from the working tree
3030
and the index, again before using the 'commit' command;
3131

32-
3. by listing files as arguments to the 'commit' command, in which
32+
3. by listing files as arguments to the 'commit' command
33+
(without --interactive or --patch switch), in which
3334
case the commit will ignore changes staged in the index, and instead
3435
record the current content of the listed files (which must already
3536
be known to Git);
@@ -41,7 +42,8 @@ The content to be added can be specified in several ways:
4142
actual commit;
4243

4344
5. by using the --interactive or --patch switches with the 'commit' command
44-
to decide one by one which files or hunks should be part of the commit,
45+
to decide one by one which files or hunks should be part of the commit
46+
in addition to contents in the index,
4547
before finalizing the operation. See the ``Interactive Mode'' section of
4648
linkgit:git-add[1] to learn how to operate these modes.
4749

0 commit comments

Comments
 (0)