Download Red Hat Enterprise Linux 7 Developer Guide
Transcript
Red Hat Enterprise Linux 7 Developer Guide T he file has been changed but not yet committed to the database. Staged A modified file has been marked to be committed in its current version. 2.3.1. Installation Git can be installed either from source or from the console. If the user is confident enough then the recommendation is to install from source, as the binary installers do not always have the most up-to-date version available. T o install Git from source code, use the following procedure: Procedure 2.2. T o install Git from source code 1. Install the libraries Git depends on: curl, zlib, openssl, expat, and libiconv. # yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel gcc 2. Download the latest snapshot from the Git web site, located here: http://git-scm.com/download. 3. Compile and install. # # # # tar -zxf git-1.7.6.1.tar.gz cd git-1.7.6.1 make prefix=/usr/local make prefix=/usr/local install 4. It is now possible to get updates for Git, from Git. $ git clone git://git.kernel.org/pub/scm/git/git.git Installing Git with a binary installer from the console is as simple as using the following command. # yum install git 2.3.2. Initial Setup After installing there are a few steps to personalize Git and get it ready for use. Once these settings are configured, they persist for future Git sessions, however to be change them again in the future, run the commands again. T hese changes are made by altering variables stored in three different places: 1. T he /etc/gitconfig file contains variables for every user on the system and all their repositories. It holds the base settings and passing --system to git config sets it to read and write from this file. 2. T he ~/.gitconfig file is specific to the user. Passing --global tells Git to read and write to this file, overriding the settings made in the first point. 3. T he config file in the Git directory (.git/config) of the repository currently being used. T his is specific to this repository only and overrides the settings in both the first and the second point. 32