I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in my pendrive, cloned from my computer at home). After several c
run git rebase -i
mark all commits that you want to change with edit
(or e
)
loop the following two commands until you have processed all the commits:
git commit --amend --reuse-message=HEAD --author="New Author
;
git rebase --continue
This will keep all the other commit information (including the dates).
The --reuse-message=HEAD
option prevents the message editor from launching.