Time for action – installing Git on Linux

As we discussed earlier, we are going to perform a Git installation on a Linux operating system with the help of your distribution's inbuilt graphical software management system. In this tutorial I have used a distribution called Ubuntu, which is based (downstream) on the famous Debian operating system.

In here the software management system is called synaptic. Perform the following steps:

  1. Open up the run utility prompt by pressing Alt + F2 and type synaptic.
    Time for action – installing Git on Linux
  2. Matching tools automatically get displayed below; let's click on the first one, which says synaptic-pkexec. This pops up an authentication dialog box, since the installation requires elevated privileges, as stated earlier. So give it your password that has administrative access and click on Authenticate.
    Time for action – installing Git on Linux
  3. This should open up the Synaptic Package Manager window, which shows you the available packages on the centre pane and available repository sources on the left. Let's type the name of the package that we want to install now which is git in the Quick filter text box. It automatically populates the matching packages on the content pane below it.
    Time for action – installing Git on Linux
  4. Now we can see a package named git whose version, which is shipped by default, is 1.7.5.4 (don't worry about the version mismatch; the concepts we are going to learn henceforth are the same for all) and its description says fast, scalable, distributed revision control system. This is the package that we want to install, so let's right-click on it and select Mark for Installation.
    Time for action – installing Git on Linux
  5. Now the checkbox next to the package name will have a tick option indicating that you have selected that particular package for installation. To handle things much more easily we are going to need two more packages associated with Git, namely Git GUI and Gitk. So let's right-click on the same package again and select the option Mark Suggested for Installation and select git-gui from it.
    Time for action – installing Git on Linux
  6. The package manager will prompt you, asking about the required package changes, that is, adding gitk to the installable list; so click on Mark. Now that you have marked your packages to be installed let's go ahead! Wait, we did not select the gitk package which we said we would need! Yes that's right, we didn't. But that will be automatically installed, as it is a dependent package. You will see that in the oncoming steps.
  7. Now go ahead and click on the green Apply button on the shortcut bar below the menu bar. You will be prompted with a confirmation dialog box as follows:
    Time for action – installing Git on Linux
  8. On clicking on Mark you will be given a summary of the packages that are going to be installed and asked for confirmation.
    Time for action – installing Git on Linux
  9. Upon confirmation the installation gets started and when done you get to see a success page as follows:
    Time for action – installing Git on Linux

What just happened?

Congratulations! Your Linux machine is now ready to control the versions of any content with the help of Git.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.80.45