I was googling around a little bit and couldn't find a good "beginners" guide to SVN, not in the meaning of "how do I use the commands" rather; How do I control my source code?
What I'd like to clear up is the following topics:
- How often do you commit? As often as one would press Ctrl + s?
- What is a Branch and what is a Tag and how do you control them?
- What goes into the SVN? Only Source Code or do you share other files here aswell? (Not considered versioned files.. )
I don't have any idea what branch and tag is so I don't know the purpose, but my wild guess is that you upload stuff to the trunk and when you do a major build you move it to the branch? So, what is considered a major build in this case?
For committing, I use the following strategies:
commit as often as possible.
Each feature change/bugfix should get its own commit (don't commit many files at once since that will make the history for that file unclear -- e.g. If I change a logging module and a GUI module independently and I commit both at once, both changes will be visible in both file histories. This makes reading a file history difficult),
don't break the build on any commit -- it should be possible to retrieve any version of the repository and build it.
All files that are necessary for building and running the app should be in SVN. Test files and such should not, unless they are part of the unit tests.
I think the main problem is the mental picture of source control is confused. We commonly have trunk and branches, but then we get unrelated ideas of tags/releases or something to that affect.
If you use the idea of a tree more completely it becomes clearer, at least for me it is.
We get the trunk -> forms branches -> produce fruit (tags/releases).
The idea being that you grow the project from a trunk, which then creates branches once the trunk is stable enough to hold the branch. Then when the branch has produced a fruit you pluck it from the branch and release it as a tag.
Tags are essentially deliverables. Whereas trunk and branches produce them.
Commit frequency depends on your style of project management. Many people refrain from committing if it'll break the build (or functionality).
Branches can be used in one of two ways, typically: 1) One active branch for development (and the trunk stays stable), or 2) branches for alternate dev paths.
Tags are generally used for identifying releases, so they don't get lost in the mix. The definition of 'release' is up to you.
Just to add another set of answers: