Skip to content

Commit 3f14246

Browse files
moygitster
authored andcommitted
commit: suggest --amend --reset-author to fix commiter identity
Since the message advises to fix the configuration first, the advantage of using this command is that it is cut-and-paste ready, while using --author='...' requires the user to type his name and email again. Signed-off-by: Matthieu Moy <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 54f4cd9 commit 3f14246

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
4545
" git config --global user.name \"Your Name\"\n"
4646
" git config --global user.email [email protected]\n"
4747
"\n"
48-
"If the identity used for this commit is wrong, you can fix it with:\n"
48+
"After doing this, you may fix the identity used for this commit with:\n"
4949
"\n"
50-
" git commit --amend --author='Your Name <[email protected]>'\n";
50+
" git commit --amend --reset-author\n";
5151

5252
static const char empty_amend_advice[] =
5353
"You asked to amend the most recent commit, but doing so would make\n"

0 commit comments

Comments
 (0)