CVS, SVN, Git, Mercurial code management tools

        In order to achieve efficient team collaboration in the modern software development process, it is necessary to use code branch management tools to realize functions such as code sharing, traceability, rollback and maintenance. Currently popular code management tools, including CVS, SVN, Git, Mercurial, etc.

        CVS and SVN are centralized management, Git has very obvious advantages, for example: the decentralized code management method reduces the developer's dependence on the central server, each member has a complete code base locally, and the Code can also be submitted under certain circumstances; unlike each branch in SVN has independent code, each branch in Git is just a pointer to the current version, and Git's branch strategy makes creating and merging branches fast and flexible .

From the Baidu index, we can also see that the advantages of Git are recognized by more and more people.

Advantages of Git

  • Git can commit locally to support offline work;
  • Git can create branches locally without namespace conflicts;
  • Git allows submissions to be made through Pull Requests, without requiring all developers to have write access to the main repository;
  • Git chooses merging branches as the main performance metric when optimizing performance, turning merging branches into a very low-cost operation to encourage the use of branches;
  • Git uses the SHA-1 hash to ensure the reliability of the data in the warehouse, and the data can be verified through SHA-1, resisting malicious tampering from attackers;

As a distributed code management tool, Git is used by more and more teams and gradually replaces the centralized SVN or TFVC, and it also faces new challenges.

Git code branching model

In the development mode of using Git to manage code and multi-person collaboration, it is particularly important for a team or even a company to have a unified and standardized workflow for the use of Git. <br> The development team follows unified rules to perform operations such as function development, problem fixing, branch merging, version iteration, and release, which can make teamwork smooth and the project move forward in an orderly manner. We put such a workflow in the organization (workflow) is called the Git code branch management model

Mainstream git code branch management model:

  • Git flow
  • GitHub flow
  • GitLab flow
  • TBD flow

image.png

 

reference

Guess you like

Origin blog.csdn.net/ejinxian/article/details/132121188