Files
30-seconds-of-code/git/s/rename-branch.md
Angelos Chalaris 5c913d20bd Reorganize snippets
2023-05-03 21:19:02 +03:00

382 B

title, type, language, tags, cover, dateModified
title type language tags cover dateModified
Rename a branch snippet git
branch
bug 2021-04-13T21:10:59+03:00

Renames a local branch.

  • Use git branch -m <old-name> <new-name> to rename <old-name> to <new-name>.
git branch -m <old-name> <new-name>
git checkout master
git branch -m patch-1 patch-2
# Renames `patch-1` to `patch-2`