Introduction to Git, installing

Source: Internet
Author: User

Brief introduction

Git is currently the world's most advanced distributed version control system, not one.

Linus (git developers) have always hated the CVS and SVN are centralized version control system, and Git is a distributed version control system, centralized and distributed version control system What is the difference?

First of all, the centralized version control system, the repository is centrally stored in the central server, and work, the use of their own computers, so the first from the central server to obtain the latest version, and then began to work, finished living, and then put their own live push to the central server. Central server is like a library, you have to change a book, you must first borrow from the library, and then back home to change, and then put back to the library.

Centralized version control system The biggest problem is the need to network to work, if it is OK in the LAN, the bandwidth is big enough, fast enough, but if on the Internet, if you encounter a slow speed, you may submit a 10M file will take 5 minutes, it is not to suppress the death of people.

What is the difference between a distributed version control system and a centralized version control system? First of all, the distributed version control system does not have a "central server", everyone's computer is a complete repository, so that when you work, you do not need to network, because the repository is on your own computer. Since everyone has a full repository on their computers, how can multiple people collaborate? For example, you change the file a on your computer, your colleague also changed the file a on his computer, when you two just push their changes to each other, you can see each other's changes.

Compared with centralized version control system, the security of Distributed version control system is much higher, because everyone's computer has a complete version of the library, a person's computer is broken do not matter, casually from other people to copy one. Centralized version control system central server if there is a problem, everyone can not work.

In the actual use of Distributed version control system, in fact, rarely in the two people on the computer to push the revision of the Repository, because maybe you two are not in a local area network, both computers can not access each other, or your colleague is sick today, his computer did not boot. Therefore, the distributed version control system usually also has a "central server" computer, but the role of this server is only to facilitate "exchange" everyone's changes, without it everyone also work, just exchange changes inconvenient.

Of course, the advantage of git is not just that it doesn't have to be networked, but we'll see Git's extremely powerful branch management, leaving SVN behind.

As the earliest open source and free centralized version control system, CVS has been used by many people until now. Due to the problem of the design of CVS, the file is incomplete and the repository is inexplicably corrupted. Also open source and free SVN fixes some of the stability issues of CVS, which is currently the most used centralized repository control system.

In addition to free, there is a charge of centralized version control system, such as IBM's ClearCase (formerly Rational Company, was acquired by IBM), characterized by the installation is larger than the windows, run slower than the snail, can use ClearCase is generally the world's top 500, They have a common feature is deep pockets, or people stupid money more.

Microsoft itself also has a centralized version control system called VSS, integrated in Visual Studio. Because of its anti-human design, even Microsoft itself is embarrassed to use.

Installation

Windows version (pro-Test)

First of all, the Windows version, because only in the Windows version is installed in person. Installation is very simple, Baidu a bit msysgit, download down is an EXE file, and then the default installation on the line.

Finally to the installation directory to find Msys.bat, double-click, entered the GIT environment.

After the installation is complete, you will need the final step, and at the command line, enter:

" Your Name "  "[email protected]"

Because Git is a distributed version control system, every machine must be tell: your name and email address. The--global parameter of the git config command uses this parameter to indicate that all of your git repositories on this machine will use this configuration, but you can also specify a different user name and email address for a particular repository.

Install Git on Linux (purely copy)

First, you can try typing git to see if the system has git installed:

$ gitThe program ‘git‘ is currently not installed. You can install it by typing:sudo apt-get install git

Like the above command, a lot of Linux will be friendly to tell you that Git is not installed and will tell you how to install Git.

If you happen to be using Debian or Ubuntu Linux, you sudo apt-get install git can simply complete the git installation in one piece.

Older Debian or Ubuntu Linux, to change the command sudo apt-get install git-core , because there was a software called git (GNU Interactive Tools), the result of Git can only be called git-core . Since git is so famous, it changed the GNU Interactive tools into gnuit a git-core formal change git .

If it is a different Linux version, you can install it directly from the source. First download the source code from the GIT official website, then unzip, then enter: ./config , make sudo make install These several commands to install just fine.

Install git (copy) on Mac OS X

One is to install homebrew, and then install Git through homebrew, refer to Homebrew's documentation: http://brew.sh/.

The second method is simpler, and the recommended method is to install Xcode,xcode directly from AppStore git, but not installed by default, you need to run Xcode, choose the Menu "Xcode", "Preferences", in the pop-up window found " Downloads ", select" Command line Tools "and click" Install "to complete the installation.

Introduction to Git, installing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.