Git/Installing
From charlesreid1
How to install git.
Installation
To install Git from source, go to http://git-scm.com/download and downloading the appropriate tarball.
Configure is straightforward to run:
#!/bin/sh
./configure --prefix=${HOME}/pkg/git/1.x.y
or whatever version you downloaded.
Run this, then run
make
make install
and you should be good to go. Don't forget to add git to your $PATH
first, though.
Configuring
What files?
The file /etc/gitconfig
sets the system-wide git configuration (lowest precedence).
The file ~/.gitconfig
sets the user-wide git configuration (middle precedence).
The file .git/config
sets the project-specific configuration (highest precedence).
First things first
Set your name and email:
$ git config --global user.name "First Last" $ git config --global user.email me@email.com
Also set your default editor:
$ git config --global core.editor vim
The --global
flag sets this for your system-wide (specific to you as a user, anyway) git profile. If you leave off the global flag, it sets it for a specific project only.
You can check your config settings by running git config --list
:
$ git config --list user.name=First Last user.email=me@email.com [...]