X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-commit.txt;h=5cc84a139133dca2fdcb594007c8b0d6464d5ca8;hb=926b1ec63ee045503f609e88ca445b94c06bd5d7;hp=8f89f6f08c57335ea6606dd1eaddde98477e9c9e;hpb=ed36a48e6d246f4f60d44b27e8c1e660151cd0b4;p=git.git diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 8f89f6f08..5cc84a139 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -8,11 +8,12 @@ git-commit - Record changes to the repository SYNOPSIS -------- [verse] -'git commit' [-a | --interactive] [-s] [-v] [-u] [--amend] [--dry-run] - [(-c | -C | --fixup | --squash) ] [-F | -m ] - [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] - [-e] [--author=] [--date=] [--cleanup=] - [--status | --no-status] [-i | -o] [--] [...] +'git commit' [-a | --interactive | --patch] [-s] [-v] [-u] [--amend] + [--dry-run] [(-c | -C | --fixup | --squash) ] + [-F | -m ] [--reset-author] [--allow-empty] + [--allow-empty-message] [--no-verify] [-e] [--author=] + [--date=] [--cleanup=] [--status | --no-status] + [-i | -o] [--] [...] DESCRIPTION ----------- @@ -39,9 +40,10 @@ The content to be added can be specified in several ways: that have been removed from the working tree, and then perform the actual commit; -5. by using the --interactive switch with the 'commit' command to decide one - by one which files should be part of the commit, before finalizing the - operation. Currently, this is done by invoking 'git add --interactive'. +5. by using the --interactive or --patch switches with the 'commit' command + to decide one by one which files or hunks should be part of the commit, + before finalizing the operation. See the ``Interactive Mode`` section of + linkgit:git-add[1] to learn how to operate these modes. The `--dry-run` option can be used to obtain a summary of what is included by any of the above for the next @@ -59,6 +61,12 @@ OPTIONS been modified and deleted, but new files you have not told git about are not affected. +-p:: +--patch:: + Use the interactive patch selection interface to chose + which changes to commit. See linkgit:git-add[1] for + details. + -C :: --reuse-message=:: Take an existing commit object, and reuse the log message @@ -84,9 +92,10 @@ OPTIONS linkgit:git-rebase[1] for details. --reset-author:: - When used with -C/-c/--amend options, declare that the - authorship of the resulting commit now belongs of the committer. - This also renews the author timestamp. + When used with -C/-c/--amend options, or when committing after a + a conflicting cherry-pick, declare that the authorship of the + resulting commit now belongs of the committer. This also renews + the author timestamp. --short:: When doing a dry-run, give the output in the short-format. See @@ -275,7 +284,7 @@ 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 'git add'. 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 -- `, +to that of the last commit with `git reset HEAD \-- `, 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, @@ -396,12 +405,6 @@ linkgit:git-mv[1], linkgit:git-merge[1], linkgit:git-commit-tree[1] -Author ------- -Written by Linus Torvalds and -Junio C Hamano - - GIT --- Part of the linkgit:git[1] suite