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
===========================================================
github:
create an account in github.com
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 ”ksrajkumar87@gmail.com” # your mail id
to add ur ssh key to github site
$cd ~/.ssh
$gedit id_rsa.pub
to copy the whole content
and open your github.com 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 user.name “ksrajkumar” #github user name
$ git config –global user.email ksrajkumar87@gmail.com # 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@github.com:ksrajkumar/first_app.git
$ git push origin master
$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
===========================================================
github:
create an account in github.com
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 ”ksrajkumar87@gmail.com” # your mail id
to add ur ssh key to github site
$cd ~/.ssh
$gedit id_rsa.pub
to copy the whole content
and open your github.com 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 user.name “ksrajkumar” #github user name
$ git config –global user.email ksrajkumar87@gmail.com # 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@github.com:ksrajkumar/first_app.git
$ git push origin master
No comments:
Post a Comment