Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Rename Branch which was created from trunk?

I want to "rename" a SVN branch and after "rename" has been done, the original branch-name must not exist anymore in branches, i.e. just like directory/file rename.

I have been searching and only got results like, First go for Deleting it then re-create from trunk...bla,bla,bla etc. which wasn't as per my requirement.

NOTE: I'd like to use TortoiseSVN client for this if possible.

like image 846
Vishal Gajera Avatar asked Oct 20 '15 10:10

Vishal Gajera


People also ask

Can I rename git branch?

The steps to change a git branch name are: Rename the Git branch locally with the git branch -m new-branch-name command. Push the new branch to your GitHub or GitLab repo. Delete the branch with the old name from your remote repo.

Can I rename a branch in svn?

Because branches and tags are ordinary directories, the svn move command can move or rename them however you wish.

How do I change the name of my remote branch?

Rename a Remote Git Branch There isn't a way to directly rename a Git branch in a remote repository. You will need to delete the old branch name, then push a branch with the correct name to the remote repository. The output confirms that the branch was deleted.


1 Answers

Copy the branch to a new name, then delete the old one.

In TortoiseSVN, you can:

  • right-click on the folder > TortoiseSVN > Repo-browser
  • find the branch you want to rename
  • right click on it > Rename
like image 109
Jiri Tousek Avatar answered Sep 20 '22 12:09

Jiri Tousek