+1

Commit authoring: support for GitHub's "Co-Authored-By"

Pierre Goiffon 3 months ago • updated by Marc Strapetz 3 months ago 5

When merging a pull request in GitHub, both the PR creator and the committer appears in the new commit ("By" = PR creator, and "committed by" = the one that merged the PR)

It happens that I need to commit something that was made by another developer, so I would love to be able to do exactly the same : set the "By" to the real author of the code, and my name only appearing as the committer.

Also, when working in pair, it would be nice to be able to add the other developer as author...

Would be perfect to be able to pick the name/email from the log (people that did already commit).

May the "Co-Authored-By" be useful for this ?

Right-clicking a commit and selecting Edit Author is not sufficient to you?

Hello,

Indeed "set author" allows to set "by" to someone I want, and "commited" stays to myself.


But there are 2 points left :

* I would love to be able to just pick an author from a list, instead of typing everything myself

* it would be nice to be able to set multiple authors

+1

> * I would love to be able to just pick an author from a list, instead of typing everything myself

We could probably offer an editable combo-box instead of a plain text field.

> * it would be nice to be able to set multiple authors

That's a completely different operation because it's not using pure Git functionality but instead adds and interprets special lines of the commit message.

I would suggest the following: convert this topic to "Commit: support for 'Co-authored-by'" (https://help.github.com/en/articles/creating-a-commit-with-multiple-authors) and have another topic for the editable Author combo-box in Edit Author?

I agree :)

But sorry I'm just able to comment, so I can't change this topic title :/

I've just created another one for the author picking : https://smartgit.userecho.com/communities/1/topics/961-commit-edit-author-command-allow-to-pick-author-from-log

+1

Thanks, I have adjusted topic title and subject.