(01) Git Git basic introduction and client installation

  1, Git compared with the svn

  svn is centralized version control typical tools, version control server, if the server is broken, only upload from a new client.

  Git is a distributed version control typical of tools, will be able to complete the local version control, the local computer store has all the history of the submitted, to avoid single point of failure.

  svn uses incremental management approach, and the way Git take a snapshot of the file system.

  Git can review the code outside the team developer contributions, svn not.

  2, Git advantage

  Most of the operations done locally, without networking

  Integrity assurance

  Adding data as much as possible rather than delete or modify data

  Branch operation is very smooth and efficient

  Fully compatible with the Linux command

  3, Git client installation

  4, Git local structure

  Git has three local area, FIG performed as follows:

  Workspace: write code, modify the code in place, the new file in the workspace

  Temporary Area: yet submitted intend to submit in the future may submit a staging area can be withdrawn, execute git add command to add from the work area to the staging area

  Local library: store a history of each version, execute git commit command to commit from the staging area to the local library

  5, Git and code hosting center

  Git and GitHub are two completely different things, GitHub is a code of Git hosting center. LAN environment can build GitLab care center, under the environment outside the network cloud may be used as a code and a code GitHub hosting center. Task code hosting center is to help maintain the remote repository.

  Within the team, as follows:

  A creates a local library A, creates a remote repository B in the care center, and the content A push to the remote repository B, B from a remote repository B clone local (automatically creates a local library), the revised code is submitted to the local library and push to the remote library B, (B does not push directly to B, need to join the team (team a first join Invite B)), B push to the remote reservoir, a can be locally pulled to pull the nail.

  Cross-team collaboration, as follows:

  A creates a local library A, creates a remote repository B in the care center, and the content A push to the remote repository B, B (not A team) from a remote repository B the fork (copy) a remote library C (C also in the code hosting center), B to C clone to a local (automatically create a local database), modify the code after submitting to the local library, then push to the remote library C, and to initiate a request to the pull of a, a review after online merge (merging) to the remote database B, where a team of people to be pulled acetate content of the modified points.

 

Guess you like

Origin www.cnblogs.com/javasl/p/12561388.html