On Git (a): What is Git

Foreword

Git is used when we write code version control tool. He is also far the world's most advanced distributed version control system. Since entering the graduate to practice work, when I found collaborate on projects in the actual development of, or in the use of project management tools Git version, there are plenty of places to optimize. To this end, he spent a period of time to study and research the use of Git, and how to use Git to manage people better collaborative projects. Of course, after a learning phase of the system, this time to write some of my feelings about learning, and they will easily go back and re-review it again.


This article focuses on a few issues:

  1. What is Git? Git is what is used to do it?
  2. What is version control, what is his role?
  3. Works centralized version control system with distributed version control system, the difference?
  4. Git Git works and the project file is responsible for functions

1. What is Git? It is used to do?

Git is as of now (2020) the world's most advanced distributed version control tool.
It is used for version control of the project.

2. What is version control, what is his role?

Let's give an example: if you write a document with a computer and want to delete a paragraph of text, but very unfortunately, this text may be used at some point in the future, this time in general you need to first this document as "document A", then go to save changes "document B" and then on that basis. Now when the document B needs to be adjusted to a structure on one level, but you do not know can not adjust like this, led by the review, it will save a new "Document C" on this basis, in we do agree that the software requirements on the phrase "software requirements are constantly changing." That period of time off, you will find more than a "document DEFGHIJK ...", not only a waste of computer memory and inconvenient administration.
There is another case, collect a table, people also need to fill in that census takers will receive multiple tables, and making a Consolidated, time-consuming ...

3. works centralized version control system with distributed version control system, the difference?

  • Centralized version control systems - cvs, svn

In short, his version of the inventory placed on a central server, and we are at work, first obtain from the central server to the latest version of the project, and then start our modification, after the completion of the work, then the content of their work push on the central server.
But such shortcomings are obvious ways: The first is to be networked, and the file is stored in the original data, it is better if it is a local area network, wide bandwidth, fast speed, but if the cloud is outside the network access, if the need to transfer large file or document, the transmission time is also cut to the heart of the pretty, the other terminal a to create a new branch will have the same branch on the B terminal.

  • Distributed version control systems - git

git, each developer has a local repository of their own, at work, first to modify and submit your own local warehouse, and finally those changes metadata that modify some information, rather than the original image svn pushing data to the remote server. Each submission is the difference between git saved records, all submissions together to get a complete record, a bit like math and problem sets.
In use git among the functions of the remote server is more interested in everyone's used to exchange and modify data storage, even without a network, you can also use a local repository for version management, but not convenient multi-party exchange their data only. In addition git branch create does not affect other people's use.

4. Git directory?

Directory name Function
config Configuration information storage project
objects folder Object storage git
HEAD file Record the current head pointer
index file Information stored in the temporary area
refs Store branch information, including the current branch, remote branch names, tags and labels
Published an original article · won praise 0 · Views 17

Guess you like

Origin blog.csdn.net/qq_30478639/article/details/104582908
Git