From: Junio C Hamano Date: Tue, 20 Nov 2012 18:14:46 +0000 (-0800) Subject: Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint X-Git-Tag: v1.8.0.1~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cdcd79321390b41df452c48c5ba9d1e4cc23a801?ds=inline;hp=-c Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint * as/maint-doc-fix-no-post-rewrite: commit: fixup misplacement of --no-post-rewrite description --- cdcd79321390b41df452c48c5ba9d1e4cc23a801 diff --combined Documentation/git-commit.txt index 9594ac8e9d,9e327cf5c0..28a5aeba2f --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@@ -42,7 -42,7 +42,7 @@@ The content to be added can be specifie 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 + 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 @@@ -193,10 -193,6 +193,6 @@@ OPTION current tip -- if it was a merge, it will have the parents of the current tip as parents -- so the current top commit is discarded. - - --no-post-rewrite:: - Bypass the post-rewrite hook. - + -- It is a rough equivalent for: @@@ -213,6 -209,9 +209,9 @@@ You should understand the implications amend a commit that has already been published. (See the "RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) + --no-post-rewrite:: + Bypass the post-rewrite hook. + -i:: --include:: Before making a commit out of staged contents so far, @@@ -295,7 -294,7 +294,7 @@@ When recording your own work, the conte 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, @@@ -389,10 -388,8 +388,10 @@@ DISCUSSIO Though not required, it's a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. -Tools that turn commits into email, for example, use the first line -on the Subject: line and the rest of the commit in the body. +The text up to the first blank line in a commit message is treated +as the commit title, and that title is used throughout git. +For example, linkgit:git-format-patch[1] turns a commit into email, and it uses +the title on the Subject line and the rest of the commit in the body. include::i18n.txt[] @@@ -409,15 -406,6 +408,15 @@@ This command can run `commit-msg`, `pre and `post-commit` hooks. See linkgit:githooks[5] for more information. +FILES +----- + +`$GIT_DIR/COMMIT_EDITMSG`:: + This file contains the commit message of a commit in progress. + If `git commit` exits due to an error before creating a commit, + any commit message that has been provided by the user (e.g., in + an editor session) will be available in this file, but will be + overwritten by the next invocation of `git commit`. SEE ALSO --------