Git Series 1-Introduction to Git

Summary of SVN

       VCS (Version Control System)-a version control system that helps us record and track the changes of various files in the project. The simplest form is to manually copy the backup file and add the time and date to the backup file. From the aspect of improving efficiency, we hope that this process is automatic and does not require too much human participation, so a version control system is born.

            The company's project uses Git as a version management tool, making it difficult for me, a person who has only used SVN for a while, to start my journey to learn Git.

       Before introducing Git, it is necessary to make a summary of the SVN flash points that have been used in the past:

                (1) Lightweight copy-for example, copying trunk to branchs / v1.0 is equivalent to making a mark in the change set file;

               (2) Authorize the file to implement version library authorization

               (3) .svn——Redundant original copy, some commands no longer need network connection, such as difference comparison, error modification and rollback

      These features have not changed substantially from CVS, the pioneering version control system. Like CVS, SVN is also a centralized version control system-a project has only one version library corresponding to it, all teams Members all interact with the server through the network, which may cause a single point of failure, and may also cause delays in operations such as viewing logs and submitting data caused by network delays. The problem is even more obvious when the WAN is used for collaborative work.

       In addition to these common problems with centralized version control systems , SVN also has its own unique problems:

                Milestones and branch design errors

                       ① Must follow certain directory rules

                       ②For newly created milestones and branches, repeated authorization operations are required.

                       ③The branch management is chaotic and random

      

      The centralized version control represented by CVS and Subversion mainly has the following defects:

      In the local working directory tree, only the latest version of the code can be seen. If you want to query historical modification records, you must connect to the server's version library.

      DVCS (Distributed Version Control System)-distributed management system, represented by Git, is effectively solving this problem.


Introduction to Git

       In order to solve the problem of the centralized version control system, a distributed version control system (DVCS-Distributed Version Control System) has been developed, and Git is its typical representative. It is the biggest difference from SVN and is also a distributed and centralized version. The biggest difference between control systems is that there is more than one version library corresponding to the system we manage.

       Specifically, for everyone, using Git has a complete version library locally, which records all the system changes and version changes before cloning. So how do you collaborate with others? You can set up one or more shared repositories to push the changes we made in the local repositories to the remote (shared) repositories, and pull the changes from the remote repositories to other local people, then you can achieve sharing. These two operations are similar to the commit and update commands in SVN.

        Okay, after a preliminary understanding of Git, we know that it solves the problems caused by centralized mode for us. So how do some problems and features in SVN be solved or reflected on Git?These questions will be followed up in the later study and use.


to sum up

        Any invention or creation, any theorem law, appears to solve a problem or solve a question. Similarly, our technology is no exception. Although there are many technologies, they can be proactive and fast when used. It is extremely critical to learn, and Git is officially started and in progress.



Published 159 original articles · praised 225 · 210,000 views

Guess you like

Origin blog.csdn.net/lyg673770712/article/details/50120643
Git