Git Installation for Windows and Linux

Lets move to the Installation of Git on Windows and Linux, to understand the basics of Git, check our early published post:
Distributed Version Control System: Git

Git on Windows –

1.) Download and run the software from “https://git-for-windows.github.io/“.
2.) Accept GNU GPU, follow the instructions on installation wizard until finish.
3.) Open the command prompt and enter “git version” to confirm the installation.

Git Windows

4.) Its recommended to associate Git username and email address for any Git commits (changes) to view in the history.

$ git config –global user.name “Thinknyx Technologies”
$ git config –global user.mail “[email protected]

5.) Lets check the configured global configuration parameters (from bydefault file “$homedir/.gitconfig”).

Git on Linux –

1.) Update package repository for OS (using yum and/or apt-get for CentOS/RHEL and/or Ubuntu/Debian).

[root@thinknyx~]#yum update

2.) Install Git using native package installation utility. We will be performing installation on CentOS 7.x, hence using YUM.

[root@thinknyx~]#yum install git

3.) On command shell enter “git –version” to confirm the installation.

[root@thinknyx~]#git –version
git version 1.8.3.1

[root@thinknyx~]#yum list git
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.qoxy.com
* epel: repo.ugm.ac.id
* extras: centos.shinjiru.com
* updates: centos.shinjiru.com
Installed Packages
git.x86_64                                             1.8.3.1-6.el7_2.1                                             @base
[root@thinknyx~]#

4.) Its recommended to associate Git username and email address for any Git commits (changes) to view in the history.

[root@thinknyx~]#git config –global user.name “Thinknyx Technologies”
[root@thinknyx~]#git config –global user.mail “[email protected]

5.) Lets check the configured global configuration parameters (from $homedir/.gitconfig).

Git_Windows_Config

[root@thinknyx~]#cat $HOME/.gitconfig
[user]
        name = Thinknyx Technologies
        mail = [email protected]
[root@thinknyx~]#
[root@thinknyx~]#git config –global -l
user.name=Thinknyx Technologies
[email protected]

Note: You can also perform the installation on other Linux Operating System using same procedure with native OS utilities.

In our next posts we will post Local/Remote Repository setup and various use cases for Git operations.

Leave a Comment

Your email address will not be published.