How to rename a local git branch

Опубликовано: 06 Октябрь 2024
на канале: Read Write Exercise
126
3

A walkthrough on how to change the name of a local git branch and how to create a git alias so you'll never forget how to do this in the future.

Command to rename a local git branch when on the branch: git branch -m new-name
Command on a different branch: git branch -m current-branch-name new-name
Command to add rename git alias: git config --global alias.rename 'branch -m'