Last active
June 14, 2020 22:03
-
-
Save jeetsukumaran/53e58f25f9ff8a13443b211f4cea8d47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Fix your Git repo branch names. | |
# Free to use (at your own risk), and share/modify, as long | |
# as you are not a racist or a tedious "2-sides" bore. | |
set -x | |
set -e -o pipefail | |
git branch -m master main | |
git push | |
git push origin :master | |
git push --set-upstream origin main | |
git fetch origin | |
git remote prune origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment