0% found this document useful (0 votes)
74 views

Upload To Git PDF

To upload a Rails project to GitHub, you must first sign up for a GitHub account. Then, set up Git by downloading and installing it along with generating an SSH key. Add the SSH key to your GitHub account and test the connection. Configure your Git username and email. Initialize a new local Git repository, make an initial commit, connect the local repository to a new remote repository on GitHub, and push the code. The uploaded project can then be accessed at the provided GitHub URL.

Uploaded by

Dhyan Premendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

Upload To Git PDF

To upload a Rails project to GitHub, you must first sign up for a GitHub account. Then, set up Git by downloading and installing it along with generating an SSH key. Add the SSH key to your GitHub account and test the connection. Configure your Git username and email. Initialize a new local Git repository, make an initial commit, connect the local repository to a new remote repository on GitHub, and push the code. The uploaded project can then be accessed at the provided GitHub URL.

Uploaded by

Dhyan Premendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Uploadingaprojectongithub:

1>ForuploadingarailsprojectonGithub,wefirstneedtosignupthereandmakeanaccount.
2>Firstweneedtosetupgitasfollows:
i>DownloadandinstallthelatestversionofGitwithSynaptic.
$sudoaptgetinstallgitcoregitguigitdoc
ii>SetupSSHkeys:
WeuseSSHkeystoestablishasecureconnectionbetweenyourcomputerandGitHub.
Settingthemupisfairlyeasy,butdoesinvolveanumberofsteps.
Tomakesureyougenerateabrandnewkey,youneedtocheckifonealreadyexists.First,
youneedtoopenanappcalledTerminal.
iii>CheckforSSHkeys.
$cd~/.ssh
IfitsaysNosuchfileordirectoryskiptostep3.Otherwisecontinuetostep2.
iv>BackupandremoveexistingSSHkeys.
SincethereisalreadyanSSHdirectoryyoullwanttobacktheoldoneupandremoveit:
$lsListsallthesubdirectoriesinthecurrentdirectory
configid_rsa id_rsa.pub known_hosts
$mkdirkey_backupmakesasubdirectorycalled"key_backup"inthecurrentdirectory
$cpid_rsa*key_backupCopiestheid_rsaandid_rsa.pubfilesintokey_backup
$rmid_rsa*

v>GenerateanewSSHkey.
TogenerateanewSSHkey,enterthecodebelow.Wewantthedefaultsettingssowhenasked
toenterafileinwhichtosavethekey,justpressenter.
$sshkeygentrsaC"[email protected]"

vi>AddyourSSHkeytoGitHub.
OntheGitHubsiteClickAccountSettings>ClickSSHKeys>ClickAddSSHkey
vii>Testeverythingout.
[email protected]

3>Setyourusernameandemail.
gitconfigglobaluser.name"YourName"
[email protected]

4>Nowproceedtofollowingsteps:
mkdirgps
cdgps
gitinit
touchREADME//toaddreadmewithproject
gitaddREADME
gitcommitm'firstcommit'
[email protected]:dhyanbaba/gps.git
gitpushuoriginmaster

>Myuploadedprojectongithubcanbecheckedoutat:
[email protected]:dhyanbaba/gps.git

//thisapplicationisintegratedwithspreewithrails3.1version.Iamlookingforcustomizingitfor
myfutureideas.

You might also like