Git - Client Installation

> Code - (Programming|Computer) Language > Code Versioning > Git

1 - Software

1.1 - Linux

yum install git

1.2 - Windows

Git for windows provides a bash and a gui.

It provides also all GNU core utility

Advertising

2 - Configuration

2.1 - Identity

git config --global user.name "Gerardnico"
git config --global user.email gerardnico@gerardnico.com

where:

  • the global option tells Git to store the parameters on a global scope
  • Verify the identity parameters by querying them
git config --global --get-regexp user
user.name Gerardnico
user.email [email protected]

2.2 - Windows

:: Long path handling
git config --global core.longpaths true
:: No Windows EOL
git config --global core.autocrlf false

2.3 - Editor

  • Set the editor
git config --global core.editor emacs

My latptop:

git config --global core.editor edgit.bat
Advertising

2.4 - Credentials

Store your credential

  • in memory for a few minutes
git config --global credential.helper cache
git config --global credential.helper wincred

2.5 - Alias

And optionally setup a few helpful aliases:

git config --global alias.st status
git config --global alias.ci commit
git config --global alias.up pull --rebase

You can now use the following command:

# Status
git st
# Commit
git ci
# Pull --rebase
git up

2.6 - Rebase

Automatic rebase

git config branch.autosetuprebase local
Advertising

3 - Documentation / Reference