Created
February 15, 2021 23:22
-
-
Save markgreene74/39dc79ed33997bbd4baaecdd11da13b6 to your computer and use it in GitHub Desktop.
Change the branch name in the local environment
This file contains hidden or 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
| # https://github.com/<USERNAME>/<REPOSITORY>/settings/branches | |
| git branch -m master <BRANCH> | |
| git fetch origin | |
| git branch -u origin/<BRANCH> <BRANCH> | |
| # example, change from master to main | |
| git branch -m master main | |
| git fetch origin | |
| git branch -u origin/main main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment