-
how can i rename/delete branches? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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:
Now you have to create a new branch and call it “new”:
The “old” branch is useless than you can delete that:
if you have “old” also in remote repository you have to delete it with:
Where origin is the remote repository. Hope to solve your problem 🙂 -Gabriele- |
Beta Was this translation helpful? Give feedback.
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:
Now you have to create a new branch and call it “new”:
The “old” branch is useless than you can delete that:
if you have “old” also in remote repository you have to delete it with:
Where origin is the remote repository.
Hope to solve your problem 🙂
-…