Use Git Series 1.1-Install

来源:互联网 发布:网络直销不合法 编辑:程序博客网 时间:2024/06/05 18:46

original page

How To Install Git on Ubuntu 14.04

Git & Doc

One of the most popular version control systems is git, a distributed version control system. Many projects maintain theirfiles in a git repository, and sites like GitHub and Bitbucket have made sharing and contributing to code simple and valuable.

How To Install Git with Apt

sudo apt-get updatesudo apt-get install git

How To Install Git from Source

  1. install before
sudo apt-get updatesudo apt-get install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
  1. get the git and download
wget https://github.com/git/git/archive/v2.10.1.zip -O git.zip

Unzip the file that you downloaded and move into the resulting directory by typing:

unzip git.zipcd git-*

Make the package and install it by typing these two commands

make prefix=/usr/local allsudo make prefix=/usr/local install

Now that you have git installed, if you want to upgrade to a later version, you can simply clone the repository and then build and install:

git clone https://github.com/git/git.git

To find the URL to use for the clone operation, navigate to the branch or tag that you want on the project’s GitHub page and then copy the clone URL

This will create a new directory within your current directory where you can rebuild the package and reinstall the newer version, just like you did above. This will overwrite your older version with the new version:

make prefix=/usr/local allsudo make prefix=/usr/local install
0 0
原创粉丝点击