Skip to content

Instantly share code, notes, and snippets.

@kyl0b1te
Created December 18, 2019 14:09
Show Gist options
  • Save kyl0b1te/fc7f1268d6320b7a92c829e12359109c to your computer and use it in GitHub Desktop.
Save kyl0b1te/fc7f1268d6320b7a92c829e12359109c to your computer and use it in GitHub Desktop.
git:tips

git tips

Change commit author

Basically all you need is to rebase to desired commit and use git ammend command.

  1. Rebase to target commit:
  • git rebase -i [COMMIT-HASH]

for the first commit:

  • git rebase -i --root
  1. Pick commit by replace pick with edit
  2. Change the commit author:
  • git commit --amend --author="Name Lastname <example@example.com>"
  1. Apply changes by:
  • git rebase --continue
  1. Update the remote:
  • git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment