Last active
October 13, 2020 11:39
-
-
Save TheRealBarenziah/434e9be111e25eda53e88c7ecb057acd to your computer and use it in GitHub Desktop.
Rename "master" branch to "senpai" (literal copy/paste of https://stackoverflow.com/a/8762634/11894221 , please upvote that man if you can)
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
git checkout master # Checkout your master branch, | |
git branch senpai # create your senpai branch , | |
git checkout senpai # switch to it, | |
git push origin senpai # push that to the server. | |
# Now go on GitHub/Atlassian/GUI to change default branch from master to senpai. Afaik it cant be done via CLI. Then, | |
git push origin :master # Delete the master branch reference on the server, | |
git branch -d master # delete the local master branch | |
# Bonus: set git alias so you can 'git notice-me senpai' | |
git config --global alias.notice-me 'push origin' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment