How do I create a branch in SVN?
相关问题
- 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
- Correct procedure to use pending branch changes in
- Mercurial compared to private branches in SVN
相关文章
- 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
Suppose you want to create a branch from a trunk name (as "TEST") then use:
If you're repo is available via https, you can use this command to branch ...
If you even plan on merging your branch, I highly suggest you look at this:
Svnmerge.py
I hear Subversion 1.5 builds more of the merge tracking in, I have no experience with that. My project is on 1.4.x and svnmerge.py is a life saver!
Branching in Subversion is facilitated by a very very light and efficient copying facility.
Branching and tagging are effectively the same. Just copy a whole folder in the repository to somewhere else in the repository using the
svn copy
command.Basically this means that it is by convention what copying a folder means - whether it be a backup, tag, branch or whatever. Depending upon how you want to think about things (normally depending upon which SCM tool you have used in the past) you need to set up a folder structure within your repository to support your style.
Common styles are to have a bunch of folders at the top of your repository called
tags
,branches
,trunk
, etc. - that allows you to copy your wholetrunk
(or sub-sets) into thetags
and/orbranches
folders. If you have more than one project you might want to replicate this kind of structure under each project:It can take a while to get used to the concept - but it works - just make sure you (and your team) are clear on the conventions that you are going to use. It is also a good idea to have a good naming convention - something that tells you why the branch/tag was made and whether it is still appropriate - consider ways of archiving branches that are obsolete.
Top tip for new SVN users; this may help a little with getting the correct URLs quickly.
Run
svn info
to display useful information about the current checked-out branch.The URL should (if you run svn in the root folder) give you the URL you need to copy from.
Also to switch to the newly created branch, use the
svn switch
command: