Skip to content

Git & github

February 5, 2011

Install git-core package in your system

$sudo apt-get install git-core

go to ur project directory. At first to create a empty repository

$ git init

add our code into empty repostitary

$ git add .

after u make an any change to commit into ur git repo

$ git commit -m “Initial commit”   #ur comments in double quote


create an account in

install ssh in ur system

$ sudo apt-get install ssh

if already ssh installed means u generate a new key using following commands

$ ssh-keygen -t rsa -C  “” # your mail id

to add ur ssh key to github site

$cd ~/.ssh


to copy the whole content

and open your account and go account settings=>ssh publc keys=>add another public key=> to paste your key in the key field

and create a repository in dashboard

configure  git with the ur system and git account at  first time only

$ cd project_dir # go to ur project directory

$ git config –global “ksrajkumar” #github user name

$ git config –global # your mail ID

above two steps are first time paring only

to open your project directory to upload your local git into github site

$ git remote add origin

$ git push origin master

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: