]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/git-commit.txt
commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-author
authorErick Mattos <erick.mattos@gmail.com>
Wed, 4 Nov 2009 03:20:11 +0000 (01:20 -0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Nov 2009 00:59:15 +0000 (16:59 -0800)
commitc51f6ceed6a9a436f16f8b4f17eab1a3d17cffed
treeeb4820a13dec61019a241bf63950b925f3796baa
parentc8a58ac5a52b0850fbca87898d1c6aa44cf5626f
commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-author

When we use -c, -C, or --amend, we are trying one of two things: using the
source as a template or modifying a commit with corrections.

When these options are used, the authorship and timestamp recorded in the
newly created commit are always taken from the original commit.  This is
inconvenient when we just want to borrow the commit log message or when
our change to the code is so significant that we should take over the
authorship (with the blame for bugs we introduce, of course).

The new --reset-author option is meant to solve this need by regenerating
the timestamp and setting the committer as the new author.

Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-commit.txt
builtin-commit.c
t/t7509-commit.sh [new file with mode: 0755]