How to change the author after rebase in SourceTree

When I edit other peoples branches, all of my work is put under someone else's name. This not only is not helpful for me, but who ever looks at my code as they might be addressing the wrong person with fixes. I am aware that in git you can write

git commit -m "myFirstCommit" --author="Example Name <someone@example.com>"

And this does not even address my exact problem. So is there a way in SourceTree to change the author. If there is not a way, what would be the next best thing?


As others have mentioned in the comments, you could use interactive rebase to do this. It's simply a matter of hitting the 'edit commit' (or was it amend? I forget). When SourceTree drops back out during the interactive rebase process to allow you to edit then you can re-commit hitting the 'amend commit' option in the commit view but changing the author from there instead. This actually creates a whole new commit SHA, too. Just hit 'continue rebase' from the "Repository" menu once you're done and it'll move you on to the next commit.

Cheers

链接地址: http://www.djcxy.com/p/49892.html

上一篇: 适用于Android和iPhone的FIPS认证

下一篇: 如何在SourceTree中重新绑定后更改作者