GIT Management at GITHUB

On April 11, 2010, in ETC, by nitesh
  • Sharebar

Source Code Management or Version Control Systems are growing as a necessity in development houses. They are evolving as a great tool for the people who work together to accomplish a project.

GITHUB is a place where we can easily store our source code and share them with the world. It lets us host our public repository for free and also has private repositories for needed people for which they charge a little.

Today, I’ll try to explain how to setup and use the facility as a contributer or a developer. Please correct in the places if I go wrong somewhere.

Step 1: Make an account at github

Step 2: Add a public key

In your PC use the following command:

$ssh-keygen -t rsa -C “your_email” //this will generate a public key for you, it will ask for pass phrase, make it a strong one

The generated file is located at “~/.ssh/id_rda.pub”. Open the file and copy its content. Then paste the content in the public key section of GITHUB

Step 3: Creating a new repository

Now, create a new repository at the GITHUB. Once created, it will give you instructions what to do next.

Step 4: Creating a local repository

This repository is the place from where you will add, commit and push files to the GITHUB. For this do the following:

$git config –global user.name “Your Name”

$git config –global user.email your_email

$mkdir <project_name>

$cd <project_name>

$git init //creates a new empty repository

$vim README //make a file and write something in it

$git status //this will show what is remaining to be tracked

$git add README //this will add the README file to the traker

$git commit -m ‘Some Commit Message’ //commit the changes with some comments

$git remote add origin git@github.com:username/projectname.git //adding the remote location

$git push origin master //push the content to github repository

More details in the previous post here

Tagged with:  

Leave a Reply

  • rss
  • facebook
  • twitter
  • youtube
  • linkedin
  • stumbleupon