Install Git To install Git under Ubuntu, it is as easy as running the following command:
sudo apt-get install git-core
To confirm whether it has been successfully installed, run the command below. This should return the path where git is located.
To determine which version of git is installed:
git --version Configuring Git
Git configuration is stored in three different locations which is based on the three levels of configuration.
System Level configuration which will be applied to every user of the system. This is stored in the/etc/gitconfig or Program Files\Git\etc\gitconfig for Windows.User Level configuration which will apply to only a single user. The path for this level is~/.gitconfig or $HOME\.gitconfig for Windows.Project Level and this will be inside the project folder like
my_project/.git/config and this will be only for that project.
All these files can be directly edited but we must be sure about their format and syntax. Any mistake can make big problems. Luckily we don’t have to edit them directly, Git comes with commands that will make the changes for us.