Skip to the content.

Git Rebase

Modify commit (already commited)

Back to specified commit of current branch:

git rebase -i|--interactive <commit-id>

if back to the first commit (root commit) of current branch, use --root:

git rebase -i --root

Modify author:

git commit --amend --reset-author

After that, (vim) editor comes out, and you can change picked to edit, and exit vim by :wq:

Back to normal state:

git rebase --continue

At last, force to push modifications to remote repo:

git push -f