Chapter 1 Git Overview

Git is a free, open source distributed version control system that can handle everything from small to large

project.

Git is easy to learn, has a small footprint, and is incredibly fast.

It has cheap native libraries, a handy staging area and multiple jobs

Features such as stream branching. It outperforms version control tools such as Subversion, CVS, Perforce, and ClearCase.

1.1 What is version control

Version control is a system that records changes to the contents of a file for future reference to revisions of a particular version.

In fact, the most important thing about version control is that it can record file modification history, so that users can view historical versions,

Convenient version switching.

1.2 Why version control is needed

Individual development transitions to team collaboration.

1.3 Version control tool

➢ Centralized version control tool

CVS、SVN(Subversion)、VSS……

Centralized version control systems such as CVS, SVN, etc., have a single centralized management server that saves revisions of all files, and people who work together connect to this server through the client to take out the latest files or submit renew. This has been standard practice for version control systems over the years.

This practice has many benefits, everyone can see to some extent what everyone else on the project is doing. Administrators can also easily control the permissions of each developer, and managing a centralized version control system is far easier than maintaining a local database on each client.

There are two sides to things, good and bad. The obvious downside of doing this is that the central server is a single point of failure. If the server is down for an hour, no one can submit updates during this hour, and they cannot work together.

➢ Distributed version control tools

Git、Mercurial、Bazaar、Darcs……

For distributed version control tools like Git, the client does not extract the latest version of the file snapshot, but completely mirrors the code warehouse (local library). In this way, if any file used for collaborative work fails, it can be restored using the local warehouse of other clients afterwards. Because each file extraction operation of each client is actually a

A full backup of the entire file repository.

After the emergence of the distributed version control system, the defects of the centralized version control system were solved:

1. Development is possible even when the server is disconnected from the network (because version control is performed locally)

2. Each client also saves the entire complete project (including historical records, which is more secure)

1.4 A Brief History of Git

1.5 Git working mechanism

1.6 Git and Code Hosting Center

The code hosting center is a remote code warehouse based on a web server, generally we simply call it a remote library.

➢ LAN

✓ GitLab

➢ Internet

✓ GitHub (extranet)

✓ Gitee code cloud (domestic website)

Guess you like

Origin blog.csdn.net/wzw_wwl/article/details/126221643
Recommended