diff options
author | Pat Notz <patnotz@gmail.com> | 2010-11-02 13:59:11 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-04 13:53:35 -0700 |
commit | 89ac1223c08a19a83f6efb32234ed8665d5ad1ee (patch) | |
tree | 721500be05711226cf225f4489f4ddaf89ebf2dc /Documentation/git-commit.txt | |
parent | b1a6c0a96f70fe39958b3315a99667740497d703 (diff) | |
download | git-89ac1223c08a19a83f6efb32234ed8665d5ad1ee.tar.gz |
commit: --squash option for use with rebase --autosquash
This option makes it convenient to construct commit messages for use
with 'rebase --autosquash'. The resulting commit message will be
"squash! ..." where "..." is the subject line of the specified commit
message. This option can be used with other commit message options
such as -m, -c, -C and -F.
If an editor is invoked (as with -c or -eF or no message options) the
commit message is seeded with the correctly formatted subject line.
Example usage:
$ git commit --squash HEAD~2
$ git commit --squash HEAD~2 -m "clever comment"
$ git commit --squash HEAD~2 -F msgfile
$ git commit --squash HEAD~2 -C deadbeef
Signed-off-by: Pat Notz <patnotz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit.txt')
-rw-r--r-- | Documentation/git-commit.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index f4a2b8c897..6e4c220f20 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend] [--dry-run] - [(-c | -C | --fixup) <commit>] [-F <file> | -m <msg>] + [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>] [--status | --no-status] [--] [[-i | -o ]<file>...] @@ -76,6 +76,13 @@ OPTIONS commit with a prefix of "fixup! ". See linkgit:git-rebase[1] for details. +--squash=<commit>:: + Construct a commit message for use with `rebase --autosquash`. + The commit message subject line is taken from the specified + commit with a prefix of "squash! ". Can be used with additional + commit message options (`-m`/`-c`/`-C`/`-F`). See + 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. |