I created a branch of an SVN project called 'features', and now whenever I try to update said project, it brings with it a features folder, which contains another copy of the project from the branch. Is there a way to remove the branch from the repository completely so that this doesn't happen any more?
相关问题
- How can I set the SVN password with Emacs 23.1 bui
- If statements in .htaccess files, to enable passwo
- SVN+SSH checkout over VPN using tortoise SVN, Smar
- Mercurial compared to private branches in SVN
- Using Subversion and SourceSafe at the same time?
相关文章
- What is the tortoisehg gui equivalent of doing “hg
- How to use Mercurial from Visual Studio 2010?
- SSIS solution on GIT?
- Is it possible to do a “destroy history” in TFS?
- Is there a version control system abstraction for
- Intermittent “SVNException: svn: E175002: Connecti
- IntelliJ Subversion Authentication Required Dialog
- TortoiseHG and hgsubversion (Windows): “no module
For those using TortoiseSVN, you can accomplish this by using the Repository Browser (it's labeled "Repo-browser" in the context menu.)
Find the branch folder you want to delete, right-click it, and select "Delete."
Enter your commit message, and you're done.
Command to delete a branch is as follows:
svn delete -m "<your message>" <branch url>
If you wish to not fetch/checkout the entire repo, execute the following command on your terminal:
1) get the absolute path of the directory that will contain your working copy
> pwd
2) Start svn code checkout
> svn checkout <branch url> <absolute path from point 1>
The above steps will get you the files inside the branch folder and not the entire folder.
Sure:
svn rm
the unwanted folder, and commit.To avoid this situation in the future, I would follow the recommended layout for SVN projects:
/someproject/trunk
folder (or just/trunk
if you want to put only one project in the repository)/someproject/branches/somebranch
/someproject/tags
Now when you check out a working copy, be sure to check out only
trunk
or some individual branch. Don't check everything out in one huge working copy containing all branches.11Unless you know what you're doing, in which case you know how to create shallow working copies.
Assuming this branch isn't an external or a symlink, removing the branch should be as simple as:
If you'd like to do this in the repository then update to remove it from your working copy you can do something like:
Then run:
You can delete the features folder just like any other in your checkout then commit the change.
To prevent this in the future I suggest you follow the naming conventions for SVN layout.
Either give each project a trunk, branches, tags folder when they are created.
From the working copy:
svn rm branches/features
svn commit -m "delete stale feature branch"