Skip to content

Instantly share code, notes, and snippets.

@markgreene74
Created February 15, 2021 23:22
Show Gist options
  • Select an option

  • Save markgreene74/39dc79ed33997bbd4baaecdd11da13b6 to your computer and use it in GitHub Desktop.

Select an option

Save markgreene74/39dc79ed33997bbd4baaecdd11da13b6 to your computer and use it in GitHub Desktop.
Change the branch name in the local environment
# 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