1

I'm planning to migrate a library that is heavily used in our repository to another library which will need me to replace lines in hundreds of files. I'd like the author to not change for this commit. How can I go on about doing this?

dev-rifaii
  • 217
  • 2
  • 9
  • 1
    Are you asking about file authorship or commit authorship? File authorship isn't really a thing in Git, since the idea is for many people to make incremental improvements to each file. Commit authorship is tied to the specific commit; commits are immutable, so modifying an existing commit generates a brand-new commit. – Jim Redmond Apr 01 '23 at 23:49
  • Unless someone specifically told you to do this, I would suggest not doing it. As said, there is no real "file author" in git. `git blame` will still show the original author for the lines that you did not change. Therefore, you will only be the author of the changed lines. Suggest you have your name associated with that change, because you did indeed make a severe change to that line. Otherwise, see @user1854438's answer. – Torge Rosendahl Apr 02 '23 at 01:56

0 Answers0