Git: Change author of pushed commits

  | #git

  1. Switch to rebase mode
    git rebase -i HEAD~<N>
    git rebase -i master
    
  2. Mark required commits to edit (e)
  3. Repeat required times
    git commit --amend --author="<new author name> <new-author@email.com>" --no-edit
    git rebase --continue
    
  4. Check if everything is ok
    git log
    
  5. Push changes
    git push --force
    

About Vladislav Bochenin

Photo of Vladislav Bochenin

Writing code more than 16 years and raising a son last 7 years.
So I more experienced in coding than raising.


Buy Me A Coffee