I am creating my first project in Subversion. So far I have
branches
tags
trunk
I think I immediately need to make branches singular and start over. Update branches is the norm.
I have been doing work in trunk and moving the contents to tags as follows.
mkdir tags/1.0
cp -rf trunk/* tags/1.0
svn add tags/1.0
svn commit -m " create a first tagged version"
My gut tells me this is totally wrong, and I should maintain some relationship between the files using svn copy. The files I create in this way will have no relationship to each other, and I am sure I will miss out on Subversion features. Am I correct?
Should I use svn copy for the individual files?
mkdir tags/1.0
svn add tags/1.0
svn copy trunk/file1 tags/1.0
svn copy trunk/file2 tags/1.0
svn copy trunk/file3 tags/1.0
svn commit -m " create a first tagged version"
Should I use svn copy on the entire directory?
svn copy cp -rf trunk tags/1.0
svn commit -m " create a first tagged version"
You are correct in that it’s not “right” to add files to the tags folder.
You’ve correctly guessed that
copyis the operation to use; it lets Subversion keep track of the history of these files, and also (I assume) store them much more efficiently.In my experience, it’s best to do copies (“snapshots”) of entire projects, i.e. all files from the root check-out location. That way the snapshot can stand on its own, as a true representation of the entire project’s state at a particular point in time.
This part of “the book” shows how the command is typically used.