Checkins

[article]

tools include features that can safely do a three-way merge automatically.  Not all developers are willing to trust this feature, but many do.

So, when using the "edit-merge-commit" approach, the merge must happen, and we are left with two choices:

  • Attempt the automerge.  (can be scary)
  • Merge the files by hand.  (can be tedious)

Developers who prefer "checkout-edit-checkin" often find both of these choices to be unacceptable.

Best Practice: Get the Best of Both Worlds
Here at SourceGear we are quite proud of the fact that Vault allows each developer to choose their own concurrent development style.  Developers who prefer "checkout-edit-checkin" can work that way.  Developers who prefer "edit-merge-commit" can use that approach, and they still have exclusive locks available to them for those times when they are needed.  As far as I know, Vault is the only product that offers this flexibility.

I apologize for this completely shameless plug.  I won't do it very often.

I will confess that I am a disciple of the edit-merge-commit religion.  People who use edit-merge-commit often say that they cannot imagine going back to what life was like before.  I agree.

It is so very convenient to never be required to checkout a file.  All the files in my working folder are always writable.  If I want to start working on a bugfix or a feature, I simply open a text editor and begin making my changes.

This benefit is especially useful when I am disconnected from the server.  When people ask me about the best way to use Vault while "offline," I tell them to consider using edit-merge-commit.  Since I don't have to contact the server to checkout a file, I can simply proceed with my changes.  The only time I need the server is when it comes time to merge and commit.

As I said, automerge is amazingly safe in practice.  Thousands of teams use it every day without incident.  I have been actively using edit-merge-commit as my development style for over five years, and I cannot remember a situation where automerge produced an incorrect file.  Experience has made me a believer.

Looking Ahead
In the next chapter, I will be talking in greater detail about the process of merging two modified versions of a file.

Eric Sink is a software developer at SourceGearwho make source control (aka "version control", "SCM") tools for Windows developers. He founded the AbiWord project and was responsible for much of the original design and implementation. Prior to SourceGear, he was the Project Lead for the browser team at Spyglass (now OpenTV) who built the original versions of the browser you now know as "Internet Explorer". Eric received his B.S. in Computer Science from the University of Illinois at Urbana-Champaign. The title on Eric's business card says "Software Craftsman". You can Eric at

About the author

TechWell Contributor's picture TechWell Contributor

The opinions and positions expressed within these guest posts are those of the author alone and do not represent those of the TechWell Community Sites. Guest authors represent that they have the right to distribute this content and that such content is not violating the legal rights of others. If you would like to contribute content to a TechWell Community Site, email editors@techwell.com.

AgileConnection is one of the growing communities of the TechWell network.

Featuring fresh, insightful stories, TechWell.com is the place to go for what is happening in software development and delivery.  Join the conversation now!