| |
|
Install Git on Linux
Install Git on Ubuntu
As we are aware from our previous chapter Git is an open-source distributed version control system which is available for everyone at zero cost. And Git is mainly designed to handle minor to major project with a good speed and efficiency. And other purpose to develop Git is to co-ordinate the work among programmers. And version control mainly allows us to track and work together with your team members at the same workspace.
Now a days Git is one of most common source code management(SCM) and this will covers more users than the earlier VCS system like SVN. Now jumo to installation of Git to Ubuntu server.
Here is the some details about the version and installation information. Here in below example we have done installation on Ubuntu 16.04 LTS. But the commands used here will also works for other versions too.
Below are the different steps to install the Git on Ubuntu server:-
(1)Step 1(Start the General OS and Package update):-
In first step we should start with our general OS and package updates. And to do that we run below command:-
$ apt-get update
Now we have started the general OS and package updates. And after that we will run the general updates on the server so that we can get started with installing Git. And to do that we run the following commands:-
(2)Step 2(Install Git):-
Now to install Git we need to run below command:-
$ apt-get install git-core
When we run above command this will install the Git on your system, Once you run this command it will ask you to confirm the download and installation.
(3)Step 3(Confirm Git installation):-
And to confirm the installtion you need to press "y" key on the editor. Now Git is installed and it is ready to use.
And when central installation is done, you need to first check the executable file is set up and accessible or not. And the best way to do this is the Git version command and to do that run below command:-
$ git --version
And output of above command is like below
git version 2.24.0
(4)Step 4(Configure the Git for the First use):-
After all of above step now Git is ready for use on our system. And you can now explore many features of the version control system. And to go with Git, you have to configure the initial user access process. And it can be done with the Git config command.
And let suppose you need to register a user whose name is "crackYourInterview" and email adress is "crackyourinterview@abc" then you can do that in following way.
And to register a username you will run the below command:-
$ git config --global user.name "crackYourInterview"
And to register an email address for above author you need to run below command:-
$ git config --global user.email "crackyourinterview@abc"
After the above step you are now a successful regsiter user for the version control system.
One of the important aspect of of Git is thet Git COnfig tool will works on a user acording to the user. To understand this we will take a example of two user let suppose there is user "Tom" which register on a Git. And there can be another user "Adam" on the same machine regsitered on Git. And to do that Adam must run the same command from his user account. And the commits made by both the users will be done under their details in Git.
To go in-depth with the git config command we will cover this later on. | |
|
|
|
|