[转] Why should you consider Git for DVCS?


DVCS - But Why?

More and more companies are making the switch to Distributed Version Control Systems (DVCS) using tools such as Git - but why?

At Clearvision, as a great supporter of DVCS, the reasons we hear from our customers differ depending upon their existing CM toolset:

  • Those moving from Subversion (SVN) tell us "it's because subversion branching and merging just does not work for us".
  • Those coming from IBM Rational ClearCase say "ClearCase is expensive, sluggish and lacks the agility of DVCS".

What's interesting is that only a small number offer the explanation "because we want to leverage the benefits of a fully distributed version control system".

It is important to understand the impact and challenges you may face when changing to a new CM tool. Moving to a DVCS adds additional areas for consideration, however there are several advantages of using distributed version control systems over the traditional centralised model:

AdvantageDetailed Explanation
Increased productivityTwo or more developers can easily co-develop a feature or fork their work to collaborate on an experiment without having to send their changes back to the central repository. There is a right and wrong time to formally store experimental or early drafts of work, DVCS tools cater for this process well.
Developers can continue working when not connected to the central repository. Some might argue that snapshot workspace technology permits offline development, however this is not the same as having all your versioned history locally available.
Speed / PerformanceBecause all the history is local, most everyday operations are faster. Whilst this does not have a dramatic improvement on productivity, it does make for happier developers and allows their working process to flow better as results are returned quicker.
Formal verses Informal developmentCentralised VC tends to enforce top downward development i.e the correct location (branch) in the centralised repository needs to be created or identified before the developer can make the change. With DVCS, developers have more freedom to create local experimental branches without requiring permissions from project authorities.
InfrastructureAvoid the need to have one physical machine as the single point of failure. DVCS is not a replacement for backups but it does give you more options.
Can still be centralisedEnterprise organisations will always retain a central copy for 'released versions'. DVCS can also be used in a centralised way thus gaining the benefits of both DVCS and centralised.

To give a balanced view we must also point out that DVCS tools are not without challenges, notably the initial cloning of large repositories, security, management of data and hooks/triggers however, there are ways to help combat these problems.

 

Why Select Git - A High Level Overview:

  • It has the largest install base of any DVCS tool.
  • There are more integrations for Git than any other DVCS tool.
  • A wealth of knowledge is easily available, an increasing number of organisations provide professional support and services for Git (including Clearvision!)
  • Git has a richer command base giving greater control and flexibility, this does however mean there is more to learn.
  • The fastest for most command operations.
  • Database of versioned code is more compact (smaller) than any other VC tool.

Areas To Watch For:

  • Documentation is not great.
  • Not good at handling multiple large binaries.
  • Windows support is poor.

Using a DVCS generally requires more discipline, teams need to be prepared to up their communication and overall collaboration. Although a need for greater communication could be seen as a hindrance in the first instance, it should be seen as a necessary benefit - communicating about code, changes and project status in general can only serve to enhance the overall process.

To learn more about Git, why not take a Clearvision Git training session or attend one of our public Git workshops.

Clearvision recently announced the launch of #goGit; the one-stop-shop for everything Git, and we mean EVERYTHING.

原文地址:https://www.cnblogs.com/buhaiqing/p/2707092.html