Git is an open source distributed version control system for agile and efficient handling of any small or large project.
1. What is version control
The main function of version control is to track file changes. It faithfully records when, who changed what content of the file and other information.
Each time a file is changed, the version number of the file will increase.
Another important function of version control is parallel development.
Software development is often multi person collaborative work. Version control can effectively solve the problems of version synchronization and development communication between different developers, and improve the efficiency of collaborative development.
2. What is version control system
Version control system is a system that records the content changes of one or several documents so that the revision of a specific version can be consulted in the future.
It can save revisions of all files of the project code.
A file can be traced back to the previous version, and even the whole project can be traced back to a certain point in time in the past.
Can be edited collaboratively
You can compare the change details of the file to find out who modified which place in the end, so as to find out the cause of the strange problem and who reported a functional defect when.
3. Centralized / distributed version control system
Compared with the centralized version control system, the security of the distributed version control system is much higher, because everyone’s computer has a complete version library. It doesn’t matter if someone’s computer breaks down. Just copy one from others. If there is a problem with the central server of the centralized version control system, everyone can’t work.
When actually using the distributed version control system, it is rare to push the revision of the version library on the computers between the two people, because you may not be in the same LAN and the two computers cannot access each other, or your colleague may be ill today and his computer has not been turned on at all. Therefore, the distributed version control system usually has a computer that acts as a “central server”, but the role of this server is only to facilitate the “exchange” of everyone’s modifications. Without it, everyone also works, but it is inconvenient to exchange modifications.