erichar11 wrote:
Just recently started using subversion as my source control system. I'm the sole developer for my project.
How often should one commt? Daily, every other day, weekley?
Couple of times a day.
Commit a lot. So if you're working on something in the morning and you're going to work on some other function in the afternoon, commit at noon, log the change. This way you can revert the work you've done in the afternoon if you don't like it, but keep the changes you've made in the morning, without any hassle
Do you commit one file at a time or multiple files? I notice with subversion, there is a change log feature that allows me specifiy whats changed. If I commit serveral files this log file could have many changes. So is it better to commit one file or multiple files.
Should a commit be performed only after a change is complied and working?
I commit solution folders. I've chopped up the project in multiple solutions (drivers, runtimes, templates, documentation, designer, code generators, SDK etc. etc.). When I work on one solution it's for a piece of functionality. So when I'm done with it, I log it. I don't log work in progress when I commit the changes at the end of the day. I commit changes at the end of the day, because I'm not breaking a build with that. In a team, you should commit to your own branch, so you won't break the build in the trunk. (I also commit to a branch, I commit bugfixes to the trunk).
So, new development: make a branch, develop to that, log occasionally (IMHO), for example milestone activity: "finished feature ABC". Bugfixes/issue resolving: work on trunk, log bug/issue in bugtracker system, make changes, test and then check in with the bug/issue number as log. This way you can find back when you've fixed which bug. Details of a bug is logged in the bugtracker
When development is done, simply MOVE trunk to tags, and copy dev branch as trunk, that is with large development (v2.0 for example, if v1.0 is in the trunk). When you've done minor development, you could also opt for a merge on the trunk, but taht can be time consuming.