Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2


Solved! Go to Solution.

how can i rename/delete branches?

1 Reply
Commander Lvl 2
Message 2 of 2

Re: branches

To rename a branch you simply need to create a new one starting from the branch you want to rename. And when you create this new branch you can simply delete the old branch.


An example: I want to rename the branch called "old" to "new". To do this with the command line you need to be in the "old" branch, so if you are not in this you need to switch to it:

git checkout old

Now you have to create a new branch and call it "new":

git checkout -b new

The "old" branch is useless than you can delete that:

git branch -D old

if you have "old" also in remote repository you have to delete it with:

git push origin --delete old

Where origin is the remote repository.


Hope to solve your problem 🙂