DEV Community

Joseph Thomas
Joseph Thomas

Posted on

Show dev: `npx no-masters`

There has been a lot of talk recently on the topic of renaming the default git repository branch to something other than master.

I'm for it - and I made tool to make it easy:

npx no-masters


  • Create a copy of your master branch and rename it to main
  • (optionally) push this main branch to github and update the default branch
  • (optionally) delete the local and remote master branches
  • (optionally) set up your local git config to use main as the default branch when creating new repositories with git init.

Enjoy, and please share!

If you have (constructive) feedback or come across any issues, DM me on twitter @typeof_goodidea or start an issue in the github repo:

Discussion (0)