Zest.

Git: Rename a branch

A short, tested Git example for rename a branch. Copy it and adjust the names and paths for your project.

Git
git branch -m new-name                    # current branch
git branch -m old-name new-name
git push origin -u new-name && git push origin --delete old-name

Find it in Zest

Search for “git rename a branch” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.

More Git examples

All Git examples