A little bash script to help you rename all of your Github repository default branches back to master
from main
.
- curl
- jq
Create a Github Personal Access Token
Then execute the following in your terminal
export GH_USERNAME=your-username
export GH_TOKEN=the-token-above
./rename.sh # or sh rename.sh
If you have more than 30 repos you will need to adjust the pagination accordingly.