Fixing git commit emails using git filter-branch
When I created the git repository for my Ruby algorithms library, I was a git noob and didn’t properly set up my email in my .gitconfig. While this is fine, it makes it so that your activity graphs on Github don’t reflect the period where you didn’t set your email, since that’s how Github rolls. Anyways, I ran the following script, then did a git push -f to do a force push to Github or any other remote repository.
If you don’t force it, you will get ! [rejected] master -> master (non-fast forward), since you’re updating past history.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |