1. Why should I use Git

Foreword

This article just recorded some of his views, may not be accurate, but for some record of learning, do not like do not spray, thank you

1. Git What is that?

It is the same as a git and svn version control software, but the difference is with the svn, git efficient version of a distributed control system. Implementation principle with svn is also very different, take a theory of space for time, why is the use of distributed, because the git will locally on each developer's have retained a copy of the repository, even in broken network time, also can submit code to own warehouse, after-peer networking, and then submitted to the central warehouse. Each developer of warehouse are not visible to each other.

First let us understand some of the concepts and terminology

1.1 local repository

Some local repository is used to document management repository component, which records the configuration information, data, current status data, and version records

1.2 workspace

After opening up local warehouse, a series of operations in the current directory can be viewed as operations on the workspace

1.3 staging area

Similar to the windows clipboard, changes to the workspace not submit data to a local warehouse for temporary storage, you can fall back to the state before the unmodified at any time

1.4 branch

When conducted a number of submissions in our local, forming a link that is called the branch, the current warehouse default master branch, you can also use the command to create the remaining branches

2. Git and Svn the difference

Baidu also performed here, a little record from https://www.cnblogs.com/baby123/p/10411103.html

  1. svn is centralized, but git is distributed, if svn central warehouse code is deleted, then the code might really be brought back, but because git is distributed, have a local copy of all the code, so even if the central warehouse code is lost, it may resume back through native code.
  2. svn commit record every time the difference data between the data are to be submitted to save, but git is modified files have to use another new file to hold, even with more resources, but now the society the most is the lack of resources of space.
  3. Svn server using the global version number, each submission will have a unique global id, and by order. The git is to get the salt value according to the encryption algorithm sha1, no distinction has
  4. Different branches of administration. svn has opened a new branch, the branch sucked original copy of all the files to the new branch, if the project is relatively large, the process can be time consuming point. The git is by way of a pointer, very fast
  5. Operation of different. svn generally submit code two codes and pull step, but the concept is git a temporary storage area, first add, and then commit.
  6. Different learning curve. relatively simple svn, git relatively steep learning curve

3. Why Git

  1. First of git is more excellent than a svn code management tool, can be said to have replaced the svn, the difference above
  2. Many current programs, we need to have support for git, possibly in the use of a tool that will check to make sure the git installation, or you must first install git requirements, we can see its activity
  3. Github code and the rise of the cloud, to pull to the operation code is completed by git

Guess you like

Origin www.cnblogs.com/duguxiaobiao/p/12598522.html