I'am using git as scm of choice but have to use a svn-repo. I can create a svn-remote-branch like this:
git svn branch the_branch
But how can i delete the remote branch?
Find the branch folder you want to delete, right-click it, and select "Delete."
Deleting a branch LOCALLY Delete a branch with git branch -d <branch> . The -d option will delete the branch only if it has already been pushed and merged with the remote branch. Use -D instead if you want to force the branch to be deleted, even if it hasn't been pushed or merged yet. The branch is now deleted locally.
The command to delete a local git branch can take one of two forms: git branch –delete old-branch. git branch -d old-branch.
To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .
Currently, it is not possible to delete an SVN branch using git-svn. But it is easy to delete the branch using SVN, without even having to check it out. So simply type
svn rm $URL/branches/the_branch
Please note that deleting a Subversion branch does not cause it to be deleted from the git-svn repository. (This is intentional, because deleting a Subversion branch does not cause any information loss, whereas deleting a git branch causes its existence to be forgotten following the next git garbage collection.) So if you want the remote SVN branch to be deleted from your git repository, you have to do it manually:
git branch -D -r the_branch rm -rf .git/svn/the_branch OR rm -rf .git/svn/refs/remotes/f8745/ (for newer versions)
To delete a git branch that corresponds to a Subversion tag, the commands are slightly different:
git branch -D -r tags/the_tag rm -rf .git/svn/tags/the_tag
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With