X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fgit-commit.txt;h=d04b342a95037378e94bd89be933130909700456;hb=beb8e1343745e99988b84b05d257ef3171f127be;hp=53b64fa595a10ec62d14fde655ce6e96cf34e09c;hpb=130fcca63fe8e7e087e7419907e018cbbaf434a3;p=git.git diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 53b64fa5..d04b342a 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -8,8 +8,8 @@ git-commit - Record your changes SYNOPSIS -------- [verse] -'git-commit' [-a] [-i] [-s] [-v] [(-c | -C) | -F | -m ] - [-e] [--author ] [--] ... +'git-commit' [-a] [-s] [-v] [(-c | -C) | -F | -m ] + [-e] [--author ] [--] [[-i | -o ]...] DESCRIPTION ----------- @@ -18,6 +18,10 @@ Updates the index file for given paths, or all modified files if VISUAL and EDITOR environment variables to edit the commit log message. +Several environment variable are used during commits. They are +documented in gitlink:git-commit-tree[1]. + + This command can run `commit-msg`, `pre-commit`, and `post-commit` hooks. See link:hooks.html[hooks] for more information. @@ -73,15 +77,20 @@ OPTIONS commit the whole index. This is the traditional behaviour. ---:: - Do not interpret any more arguments as options. - -...:: +-o|--only:: Commit only the files specified on the command line. This format cannot be used during a merge, nor when the index and the latest commit does not match on the specified paths to avoid confusion. +--:: + Do not interpret any more arguments as options. + +...:: + Files to be committed. The meaning of these is + different between `--include` and `--only`. Without + either, it defaults `--only` semantics. + If you make a commit and then found a mistake immediately after that, you can recover from it with gitlink:git-reset[1].