Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

version control practice

In my current job the supervisor's practice is to only check in production ready code. Most recently the project I was on involved work by 3 different developers with some file overlap. This meant manually integrating changes despite the fact that some changes took a day and then it was done. I wanted to see if this was a common practice and get suggestions on how to change this practice with the knowledge that many times my opinion means little in the grand scheme of things.

like image 442
osp70 Avatar asked Sep 04 '08 19:09

osp70


People also ask

What are the three types of version control?

The types of VCS are: Local Version Control System. Centralized Version Control System. Distributed Version Control System.

What is an example of version control?

Version control is a component of software configuration management. Changes are usually identified by a number or letter code, termed the "revision number", "revision level", or simply "revision". For example, an initial set of files is "revision 1".

What are version control procedures?

Version control is the process by which different drafts and versions of a document or record are managed. It is a tool which tracks a series of draft documents, culminating in a final version. It provides an audit trail for the revision and update of these finalised versions.


2 Answers

You can use various ways to handle this situation, depending on your source control system.

Private branches: Allow you to check in and work on code while you go, merging back and forth at appropriate times.

Shelvesets/pacakaged changesets: Allow you to store changesets and send them around for review - ensuring they're production ready before check in.

As to whether this is an appropriate way to work, we don't allow check-in to main branches without prior review. To pass review your code must pass various automated tools, and then must be acceptable to your peer reviewer. For some definitions of "production ready" - this is it. Therefore, we do something like what you do. However, we use private branches to ensure that check-ins can still be made while this is in progress, and that other check-ins don't have to interfere.

If production ready means tested in an integration environment, then it sounds like you may need staging branches or something similar.

like image 183
Simon Steele Avatar answered Oct 07 '22 03:10

Simon Steele


Code that is checked in should be unit tested, but, to me, "production ready" implies that it's gone through integration and system testing. You can't do that until a code freeze, so I don't see how you can do that before every check in.

like image 21
Thomas Owens Avatar answered Oct 07 '22 01:10

Thomas Owens