Skip to main content

Command Palette

Search for a command to run...

Renaming a branch with Git

Updated
1 min read
Renaming a branch with Git
C

Hi, I'm Cristina Ramirez, I'm a computer engineer and software developer with more than 10 years of experience as backend developer, web application development, API REST services for mobile applications, system analysis and logic.

Programming languages: Ruby, PHP, C, C++, C#, CSS, JavaScript.

Frameworks: Ruby on Rails, PHP (Codeigniter, APPHP).

Experience of relational databases (Postgres, MySql, Oracle) and NoSQL databases (MongoDB, Neo4j).

I like innovation and teamwork.

🇻🇪 Spanish

1.- Enter inside the branch that you want to rename with git checkout command <branch's_name_to_be_rename>

git checkout stable

2.- Execute git branch -m <branch's_name_new> command to change the name of the branch. You can see the changes and all branches with git branch command.

git branch -m develop

3.- If you want to do the process in one step you need to use git branch -m <branch's_name_to_be_rename> <branch's_name_new> command. You do not need to be inside the branch to rename.

git branch -m stable develop

Reference:

git-scm.com/book/es/v2

19 views