Configure the CentOS install git (small mu git install Command complete version) on Alibaba Cloud

Source: Internet
Author: User
Tags gettext git workflow svn versions centos version control system

Step is relatively simple

The main is to record the implementation of the process of the memo.

More detailed tutorial: http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/ 00137583770360579bc4b458f044ce7afed3df579123eca000

CentOS Yum source does not have git and can only compile and install itself

Ensure that the dependent packages are installed

   
   
 
  
  
Yum Install Gettext-devel

Download the latest Git package

   
   
 
  
  
sudo make install

Check the installed version, done

   
   
 
  
  
Git--version

Reference:

1 About Version control

Versioning is a system that records the changes in one or several file contents so that future revisions of a particular version are reviewed. There are three versions of the following control systems:

1. Local version control system

Many people are accustomed to copy the entire project directory in a way to save different versions, perhaps renaming and backup time to show the difference. The only benefit of doing so is simplicity. However, there are many disadvantages: sometimes confusing the working directory, once the wrong file lost data can not undo recovery.

In order to solve this problem, many kinds of local version control systems have been developed long ago, and most of them use some simple database to record the changes of files. As shown below,

2. Centralized version control system

A centralized versioning system (centralized version control systems, referred to as CVCS) enables developers on different development systems to work together. Such systems, such as cvs,subversion and Perforce, have a single, centrally managed server that keeps revisions of all files, while people working together connect to the server through the client, removing the latest files or submitting updates. Over the years, this has become a standard practice for version control systems

3. Distributed version control system

Distributed Versioning systems (distributed version control system, referred to as DVCS), such as Git,mercurial,bazaar and Darcs, do not only extract the latest versions of file snapshots, Instead, the code repository is completely mirrored. As a result, any server that works together fails and can be recovered using any of the mirrored local repositories afterwards. Because each fetch operation is actually a full backup of the code warehouse at one time,

Further, many of these systems can be specified to interact with several different remote code warehouses. With this, you can collaborate with people from different working groups on the same project. You can set up different collaborative processes as needed, such as hierarchical model workflows, which are not achievable in previous centralized systems.

2 about Git

Git is a perfect implementation of a distributed version control system, and the basic differences with the centralized version-control system SVN are as follows:

Git is distributed, and SVN is not

GIT has its own centralized repository or server like SVN. However, Git prefers to be used in distributed mode, where each developer Chect out code from the central repository/server and clones a repository on its own machine.

Git stores content as metadata, and SVN is file-based

All resource control systems hide the meta-information of files in a folder similar to. Svn,.cvs. If you compare the size of the. git directory with the. SVN, you will find that they are very different. Because the. Git directory is a cloned version of the repository on your machine that has everything on the central repository, such as tags, branches, release notes, and so on.

The difference between GIT branch and SVN branch

The SVN branch is another directory in the repository, and the Git branch is a snapshot of the entire repository and can be quickly switched between several branches in the same working directory.

Git does not have a global version number, and SVN has

The SVN version number is actually a snapshot of the source code for any corresponding time. And git doesn't have a global version number, which is one of the biggest features that git lacks.

Git has better content integrity than SVN

Git's content store uses the SHA-1 hashing algorithm. This ensures the integrity of the content of the code and ensures that the repository is compromised when disk failure and network problems are encountered.

The basic git workflow is as follows:

Modify some files in the working directory.

Take a snapshot of the modified file and save it to the staging area.

Commit the update to permanently dump the file snapshot saved in the staging area to the Git directory.

3 Git Server Setup

1. Environment deployment

System environment: Server side: CentOS 6.5, ip:192.168.56.1

Client: CentOS 6.5, ip:192.168.56.101

Software version: Server-side: source code compiled and installed, git-1.9.0.tar.gz

Client: Yum Online installation mechanism

2. Installation

2.1 Server side:

#yum Install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel

#wget http://git-core.googlecode.com/files/git-1.9.0.tar.gz

#tar ZXVF git-1.9.0.tar.gz

#cd git-1.9.0

#make prefix=/usr/local All

#make prefix=/usr/local Install #root用户运行

View version number: Git--version

Related Article

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.