Github: how to checkout my own repository

Github

Github Problem Overview


I am very new to GitHub.

I have created a GitHub repository and pushed it from my computer.

Now I need to work on it from another computer.

How can I checkout my own repository? Should I fork it as for other people's repositories?
It seems to me a bit silly to fork my own repository, though.

Github Solutions


Solution 1 - Github

On the project page (http://github.com/you/project) there will be a link on the right at the bottom of project tools list with a path to a .git repo

git url new site layout

Open a terminal and type:

git clone [link to repo here]

That will create a local clone of the repo you can work on, then if you follow the instructions on GitHub to add a remote server you can push your changes back.

Syncing files back and forwards is just as easy;

Computer A (Had the original git repo)
Computer B (Has the cloned repo)

Make some changes on Computer A, then run

git push origin master

Go to computer B, then run

git pull origin master

To sync your new changes, make some changes on computer B then push back

git push origin master

Solution 2 - Github

You don't need to fork it on the site, you can just clone your repository. There are links on your repository's page for cloning it with the SSH, git, or HTTP protocols. (Since it's your own, you probably want the SSH one.)

Information about how to clone a repository will come up very early in any git tutorial, so I'm not sure it's worth adding much more here - you might want to start with the one in Pro Git, for example:

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDanView Question on Stackoverflow
Solution 1 - GithubSmudgeView Answer on Stackoverflow
Solution 2 - GithubMark LongairView Answer on Stackoverflow