Git - Client Installation
Software
Linux
yum install git
Windows
Git for windows provides a bash and a gui.
It provides also all GNU core utility
For windows, select the Windows Native OpenSsh if you want to have the ssh-agent with forwarding
Configuration
Identity
git config --global user.name "Gerardnico"
git config --global user.email [email protected]
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]
Windows
:: Long path handling
git config --global core.longpaths true
:: No Windows EOL
git config --global core.autocrlf false
Editor
- Set the editor
git config --global core.editor emacs
My latptop:
git config --global core.editor edgit.bat
Credentials
Store your credential
- in memory for a few minutes
git config --global credential.helper cache
- in windows credential Install with Git for windows (see also Credential Manager)
git config --global credential.helper wincred
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
Rebase
Automatic rebase
git config branch.autosetuprebase local