Anonymous user
Open Source Comes to Campus/Curriculum/Git/Students: Difference between revisions
Open Source Comes to Campus/Curriculum/Git/Students (view source)
Revision as of 21:33, 22 November 2013
, 10 years agono edit summary
imported>Shauna No edit summary |
imported>Shauna No edit summary |
||
Line 99:
The copy of the repository you have on your computer is called your "local" copy. The copy on Github is a "remote". You can see what remotes are associated with your local repository by typing the command:
You should see something like this:
Origin is the default name for your remote repository. The
To do this, type:
To do this, first you need to add the main repository as a remote. Type:▼
▲<code> git remote add $name $URL</code>
Replace $name with whatever you want to label the remote, and $url with the github url for the main repository.
When you do the "git remote -v" command, you should see that you now have two sets of fetch/push listings. To get an updated version of the main repository, you can type:
git merge
To update your remote personal repository, you can type:
▲
git push $name master
You should get an error, as you don't have push access to the main repository.
That's it! You can add as many remotes as you'd like, although for the most part people stick to one or two.
|