Skip to content

Instantly share code, notes, and snippets.

@jeetsukumaran
Last active June 14, 2020 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeetsukumaran/53e58f25f9ff8a13443b211f4cea8d47 to your computer and use it in GitHub Desktop.
Save jeetsukumaran/53e58f25f9ff8a13443b211f4cea8d47 to your computer and use it in GitHub Desktop.
#! /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