Wednesday, June 18, 2014

Version Control Best Practices


1         Introduction


This article arms to provide guidelines on version control for programming activities for programmers and developers. It does not cover branching or releasing process, which also are part of software development process. I had a separate article address that in my blog.

2         Purpose and Principles of version control


The following are the primarily purposes of the version control:

·         Collaboration development on the same code base among team members

·         Tractability

·         Capability of rolling back to certain state of the controlled file (source code)

With those purposes listed here, one would be able to drive some principles with regard to version control:

·           Check out less files possible, holding them for the shortest period time possible. This is so that others can work on the code base without needing to merge.

·           Check in files for a single logical unit of work. This is so that it can be tracked and rolled back when necessary.

3         Guidelines 


 

In the sprite of the principles established above, the following guidelines are recommended for software development project. The guidelines recommended here are applicable to project size from 2 to 200+  

3.1       If it is not version control, it does not exist


3.2       Check in frequently


3.3       Check in the code in single logically unit


3.4       Do not break the build


3.5       If the build is broken, it is the top priority to fix the build

 

3.6       Always inspect your changes before checking in


3.7       Provide meaningful comment when checking in


3.8       Database schema should be treated in the same way the source code is treated, version control them.


3.9       Compilation output does not belong in version control


3.10  Third party referenced libraries need to be version controlled as well


3.11  Integrate with others code changes often


3.12  Coordinate with fellow team members avoid merging with best effort


3.13  Understand the limitation of the tools

No comments:

Post a Comment