Fixing Git History
There are two files that I tend to use to fix up some screwed up git history. None of these files should be used on huge repositories where a lot of people have forks and clones. Running any of these files completely rewrites history and will change the git SHA of all of the later commits.
I've used this first file when I've accidentally committed a bunch of past commits with the wrong email (think work vs. personal emails). To use it:
- Make a backup branch:
git branch default_branch_backup
- Make sure you're back on the default branch:
git checkout default_branch
- Run the script:
- Wait patiently...