Install Git on Ubuntu 12.04:

Git is an open source, distributed version control system (VCS). It’s commonly used for source code management (SCM), with sites like GitHub offering a social coding experience, and popular projects such as Perl, Ruby on Rails, and the Linux kernel using it.Git is Associate in Nursing open supply, distributed version system (VCS). It’s ordinarily used for ASCII text file management (SCM), with sites like GitHub giving a social secret writing expertise, and popular projects like Perl, Ruby on Rails, and the Linux kernel using it.

Pre-Flight Check

  • These instructions are intended for installing Git on Ubuntu 12.04.
  • I’ll be acting from a Liquid net Core Managed Ubuntu 12.04 server, and I’ll be logged in as root.

Step 1: Installation

First, you’ll follow a simple best practice, ensuring the list of available packages is up to date before installing anything new.

[pastacode lang=”apacheconf” manual=”apt-get%20update” message=”” highlight=”” provider=”manual”/]

Then it’s a matter of just running one command for installation via apt-get:

[pastacode lang=”apacheconf” manual=”apt-get%20install%20git-core” message=”” highlight=”” provider=”manual”/]

You’ll be asked to substantiate the transfer and installation; merely enter y to substantiate. Once this command is complete, stinkpot are going to be put in and prepared to use!

As of the writing of this tutorial, this version of stinkpot accessible within the Liquid net repositories is: stinkpot version on 1.7.9.5. you’ll be able to check the version of stinkpot that was put in by mistreatment the subsequent command:

[pastacode lang=”apacheconf” manual=”git%20–version” message=”” highlight=”” provider=”manual”/]

Step 2: Configuration

To prevent any commit errors, it’s a good idea to setup your user for git. We’ll setup the user test user with the e-mail address [email protected].

[pastacode lang=”apacheconf” manual=”git%20config%20–global%20user.name%20%22testuser%22%0Agit%20config%20–global%20user.email%20%22testuser%40example.com%22″ message=”” highlight=”” provider=”manual”/]

Next we’ll verify the configuration changes by viewing the .gitconfig . Since you will are roaming around your server’s classification system before beginning this tutorial, use the cd command to come back to your home directory:

[pastacode lang=”apacheconf” manual=”cd” message=”” highlight=”” provider=”manual”/]

And then view the .gitconfig :

[pastacode lang=”apacheconf” manual=”cat%20.gitconfig” message=”” highlight=”” provider=”manual”/]

You can also view the same details of your configuration by using the following command:

[pastacode lang=”apacheconf” manual=”git%20config%20–list” message=”” highlight=”” provider=”manual”/]

Categorized in: