Git-a tool that programmers must master

What is Git?

What is it?

Git is a distributed version control tool

The professional name is: distributed version control system .

What is version control?

  • Now there is such a scenario: when we are writing the thesis, we have finished writing and submitted it to the instructor for review. The teacher said that you write badly and you need to change it, so you just change it. The general approach is: ** Do not modify directly on the original paper, but make a copy and make changes on the newly copied one. ** Because if you change the thesis, the teacher commented that it was not as good as the last one, so you can repeat it, you can still find the last thesis, but if you do n’t copy it, directly change it on the original thesis ...
    [External image transfer Failure, the source site may have an anti-theft chain mechanism, it is recommended to save the picture and upload it directly (img-MONEMKpf-1587038966942) (README.assets / picture 1.png))

  • In the above scenario, the original paper is a version, and the newly copied paper is a new version. ** To put it simply, we copy the original paper and create a new paper by adding version control. ** Only this version control is done manually by us.

What is a version control system?

  • A version control system is a system that automatically helps us complete the above operations or an application (the system here does not refer to an operating system, but an application system. Like when we do web projects, we often name the project: Shopping mall system, ERP system, and so on, are they operating systems? No, just a program ).

How does the version control system help us control the version?

  • The files that we need to perform version control must be submitted to a ** repository (in fact, a hidden folder) **, the changes we make to the files will be detected by this version control system, if we want to keep this version File, you must submit the file to the warehouse through the command provided by the version control system, and then the version control system will automatically mark the version of the file we submitted.

What kind of warehouse?

  1. Local warehouse: Create a local folder.
  2. Remote warehouse: a folder created in a server on the Internet.

There are several types of version control systems?

  • Distributed version control system

    • Equipped with the above two warehouses, there is a local warehouse on your computer and a remote warehouse on a remote server.
    • When we submit the file, we will first submit it to the local warehouse, and then when there is a network, then submit it from the local warehouse to the remote warehouse on the network.
    • Git is a typical distributed version control system
  • Centralized version control system

    • Only equipped with the above remote warehouse, of course, if your computer acts as a remote server, then the remote warehouse is actually on your computer.
    • When we submit the file, we submit it directly to the remote warehouse.
    • SVN is a typical centralized version control system`

It should be understood now

Published 10 original articles · Likes2 · Visits 253

Guess you like

Origin blog.csdn.net/Tong89_xi/article/details/105565888