Pages

Thursday, April 19, 2012

Installing and Setting Up Git in Ubuntu 11.10

With the new job I got to do so many new things and one of them was Git. Git is a distributed version control system. To know more about Git you can follow these links on wikipedia, git's web site and github. In this section I will use Git version 1.7.5.4.

Prior to Git I have worked on many version control systems such as CVS, SVN, Clear Case and MKS. Git, not gives a way to manage your repositories but you can also become social coder. Its social network on github.com makes it different and more interesting. Here we will see how to install git and configure it.

What you will need
  1. Git software including git-core*, git-gui
  2. Account in github.com. You can signup for free account in github.com
Install git
  1. Before installing check if git is already installed, open terminal and execute git command. You will see whether git is installed or not.
  2. Open Ubuntu Software Center, search git-core and install it.
  3. As shown in step 2, install git-gui from software center.
  4. Verify Git installation (git-gui).
  5. Open terminal and execute git command. You can check the version also as shown below using the command

Setup git
Now, I will setup github account.
  1. Open terminal, execute the command
    git --version
    
  2. Execute this command to generate SSH key
    ssh-keygen -t rsa -C "manohar.negi@komli.com" 
    
  3. Copy the contents of /.ssh/id_rsa.pub file
  4. Sign in to github account
  5. Account Settings --> add new ssh key with the value as the contents of id_rsa.pub file
  6. Test the connection
    ssh -T git@github.com
    
That's all. With this you will be able to use git.

No comments:

Post a Comment