Inspiration hit when reading Scott Hanselman’s post about renaming the master branch to main to make our language as tech sector more inclusive. To make this operation easier, here’s a small script to run for easily renaming the master branch to ‘main’ for any git project: Couple of caveats: A manual step is needed in the middle of the script to update the default branch to main Only tested on Mac OS, will probably fail on Unix due to sed differences