Git Installation & Configuration

In this page

  1. Install package and utilities
  2. Global configuration
  3. Repository specific configuration

1. Install package and utilities

Install git in the server and clients:

$ sudo apt-get install git

Install gui utilities (useful on client only):

$ sudo apt-get install git-cola gitk

2. Global configuration

git client global configuration

Make a global initial configuration on each client machine:

$ git config --global user.name "Name of individual..."
$ git config --global user.email "...and his email"
$ git config --global core.editor nano    # or another editor
$ git config --global merge.tool meld     # or another editor
$ git config --global color.ui true       # Set default color scheme
$ git config --list                       # Show all of the above (and more) 
$ git config --global --unset [key]       # Remove key

3. Repository specific configuration

Make some local (repository specific) useful configurations that allow, for instance, to type git pull without naming the repository and branch:

Set the default remote name
$ git config --local branch.master.remote origin
Set the default remote branch
$ git config --local branch.master.merge refs/heads/master