Re: commit --amend --author error
From: Jeff King <hidden>
Date: 2016-06-15 23:03:28
On Tue, Jan 13, 2015 at 12:24:18PM +0100, Michael J Gruber wrote:
Gunnar Wagner schrieb am 13.01.2015 um 09:15:quoted
I got APGL licensed code from someone else and want to post it on my github (without taking credit for the work) tried git commit --amend --author="Author name, www.website.com" but got an error message which said something like "original author not found" Can it be that the --amen --author only work if the author is on github himself?This has nothing to do with github. The author has be in the form "authorname <authoremail>". The important parts for the format are the <>.
Yes, but the error message is a hint that there is something else going on. When there are no angle brackets, some DWIM magic kicks in: git tries to find a matching author by walking the project history from HEAD. So you can do (in git.git): $ git commit --allow-empty -m foo --author=gruber [detached HEAD 73ef08b] foo Author: Michael J Gruber [off-list ref] Of course that does not work if you do not already have commits from the person in your repository: $ git commit --allow-empty -m foo --author=foobar fatal: No existing author found with 'foobar' -Peff