Reword old Git commits
git rebase -i --committer-date-is-author-date HEAD~n
git push --force
rebase
modifies history in a few ways, such as rewording commits-i
(short for--interactive
) lets you chose specific commits to reword--committer-date-is-author-date
(optional) keeps original date instead of updating itHEAD~n
reference, current branchn
commits back
Force pushing is needed since history is modified, will cause trouble if you work with other people.