Install git and git help manual "go" under Ubuntu

Source: Internet
Author: User
Tags openssl using git version control system

Transfer from: http://milkythinking.com/blog/2011/04/17/install_git_and_manual/Git introduction

Git is a distributed version control system that corresponds to a centralized version control system such as SVN and CVS.

Although it was a long time ago to know and install git, I didn't use it much, and I used SVN. The benefits of git that you see in Pro git are:

    • All the contents of the Code warehouse are fully mirrored locally and can be recovered using any local image if the server fails. In the case of SVN, if there is no security and grief on the server-side data, all previous record data will be lost and unrecoverable after the failure.
    • All the contents of the Code warehouse are fully mirrored locally, and you can continue to work locally, commit code, wait for network connectivity, and then synchronize updates to the hub server for some reason that you cannot connect to the hub server.

Of course there are other benefits, but I have not experienced, can not be well described, and so on after the experience in the supplementary bar.

Install Git

Git's work calls for code from libraries such as CURL,ZLIB,OPENSSL,EXPAT,LIBICONV, so you need to install these dependent tools first.

apt-get install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

Installing from source code

Download the latest source code to the GIT official site, such as the current version of 1.7.4.4.
Compiling the installation command

tar -zxf git-1.7.4.4.tar.gz
cd git-1.7.4.4
make prefix=/usr/local all
sudo make prefix=/usr/local install

Binary Package Installation

This method is easy to install, I use this method, but often not the latest version of Git, such as my version is 1.7.2.1.

apt-get install git-core

Installing the GIT Help manual

After using the binary package installation, found that the GIT Help manual is not installed, the source code after installation if there is a similar situation is not known, if there is also can be installed in the following way.
Use git --version to view your own installed version of Git.
Then now correspond to the Help manual and unzip to the appropriate location:

curl -O "http://kernel.org/pub/software/scm/git/git-manpages-1.7.2.1.tar.bz2"
sudo tar xjv -C /usr/local/share/man -f git-manpages-1.7.2.1.tar.bz2

You can also copy and execute the following script to easily fix the manual installation:

cd /tmp
curl -O "http://kernel.org/pub/software/scm/git/git-manpages-`git --version | awk ‘{print $3}‘`.tar.bz2"
sudo mkdir -p /usr/local/share/man
sudo tar xjv -C /usr/local/share/man -f git-manpages-`git --version | awk ‘{print $3}‘`.tar.bz2

Other considerations for using Git

When initializing a project with Git, you may encounter the following warning message:

warning: templates not found /usr/local/share/git-core/templates

The reason is because the template directory read and write permissions caused by the use of the following command to change the template directory read and Write permissions:

sudo chomd -R 755 /usr/local/share/git-core/templates/

Reference Links:

Installing the GIT Help manual

Pro git is a free git book with Chinese version

Gonna sailing
==end==

Install git and git help manual "go" under Ubuntu

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.