Skip to content

Instantly share code, notes, and snippets.

@dizzersee
Created December 7, 2019 12:22
Show Gist options
  • Save dizzersee/a3cdaa57818f7def8206f97aa957ff8d to your computer and use it in GitHub Desktop.
Save dizzersee/a3cdaa57818f7def8206f97aa957ff8d to your computer and use it in GitHub Desktop.
Git rename branch
Locally:
```
git checkout oldname
git branch -m "newname"
git push origin :oldname newname
git push origin -u newname
```
In remote:
```
git pull
git checkout newname
git branch --unset-upstream
git pull origin newname
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment