Re: commit --amend --author error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 13, 2015 at 12:24:18PM +0100, Michael J Gruber wrote:

> Gunnar Wagner schrieb am 13.01.2015 um 09:15:
> > 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 <git@xxxxxxxxxxxxxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]