Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN best-practices - working in a team

Tags:

svn

I'm starting out with SVN. I know the basic commands and understand the base principles. I was wondering if anyone has any tips or best practices for working with Subversion in a team environment.

I can see the benefit of adding reasonably verbose messages when committing code, but are there other things I should bear in mind?

Thanks for all the great answers - they've helped a lot.

like image 870
codeinthehole Avatar asked Jan 06 '09 18:01

codeinthehole


People also ask

What are two best practices while working with SVN?

Establish a branching and tagging practice. Tag major bug fixes at the beginning and end of the work. Maintain tags (and possibly branches) for production/qa releases.

What is head revision in SVN?

The HEAD revision refers to the most current revision in a repository. If you are browsing the HEAD revision of your repository and one of your teammates commits a change, those new changes will be included when you decide to check out a working copy of that revision or fetch specific information about it.


1 Answers

Encourage frequent commits. Teammates new to version control may feel like they need to keep the code out of the repository until "it works right". Teach everyone to commit early and often to find issues as soon as possible. Instead of holding code 'till it works, propose that your teammates create branches for feature that might break trunk. That leads to...

Establish a branching and tagging practice. In addition to branches for features, encourage your teammates to use branches for large-bug fixes. Tag major bug fixes at the beginning and end of the work. Maintain tags (and possibly branches) for production/qa releases.

Establish a policy for trunk and stick to it. One example might be, "trunk must always build without errors." or "trunk must always pass all unit tests". Any work that can't yet meet the standards of trunk must be done in a branch.

like image 156
Gordon Wilson Avatar answered Sep 17 '22 20:09

Gordon Wilson