This work's only if you HAVE NOT pushed to your remote branch yet.
$ git rebase -i HEAD~3
Then *EDIT* all the commits. At first, it will look like the below:
pick 8eefaac Prevent hitting the database twice for same query
pick 636c72g Only check the one column
pick d7a8674 Add followed_on index
You'll need to "edit" all of them so they're popped off the commit stack to be re-commited with a different author. So before you save and quit the file, it should look like this:
edit 8eefaac Prevent hitting the database twice for same query
edit 636c72g Only check the one column
edit d7a8674 Add followed_on index
Now you're at the earliest commit. To change the author all you need to do is:
$git commit --author corey@hashrocket.com --amend
You'll be put into the amend screen for the commit you're doing so now you can save and quit. Your commit should now have the correct author so you can move to the NEXT commit by running the following:
$git rebase --continue
This will bring you to the next commit to change the author on. Just rinse and repeat and you'll be done soon enough. Below are the commandline steps for future reference :)
To start:
$git rebase -i HEAD~3
Repeat the below for each commit:
$git commit --author corey@hashrocket.com --amend
(save and quit here, no further changes are needed for the commit, unless you think there are)
$git rebase --continue