Quote:
Originally Posted by KevinH
Hi,
Thanks for the help, but I would need to do that for each of the 60 commits so I might as well just erase the whole thing and start again since setting the author for each commit is needed, right? It would be safer I think anyway.
Also, can you assign more than 1 author for a single commit?
Thanks,
KevinH
|
One commit per author.
Sure you can start over. But currently you have the actual
contents of the commits the way you want them, correct?
rebase allows you to keep the content and just edit the metadata of the commits. (It does other things too, of course.

)
It's really easy to edit the author each time, just hit the up arrow in your terminal, right-arrow a few times and edit the --author flag.

Compare that to cp'ing in the right files, git add -A,
then changing the author and email config or overriding via the exact same method I described..., then rewriting the whole commitmsg from scratch rather than editing the current one... (my method preserves the commitmsg generated by rebase)...
Oh yes. If you want to preserve the commitmsg but remove the extraneous authorinfo, you should use --edit -m instead, but once again setting a blank email seems to break. You should probably just use
Code:
git commit --amend --author="Adam Selene <none>" && git rebase --continue
which does absolutely everything right in the first place except for leaving a weirdly fake email address. I am not sure it is worth finding a workaround.
I just love the inconsistency. Really.
EDIT (again): I like the answer below.
You might want to use
Code:
--msg-filter 'sed -e "/Authors[^,]*$/d"'
to remove the authors info if there is only one author listed.