Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github: how to checkout my own repository

Tags:

github

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.

like image 370
Dan Avatar asked May 13 '11 09:05

Dan


People also ask

How do I access my GitHub repository from command line?

Open a command prompt. To launch GitHub Desktop to the last opened repository, type github . To launch GitHub Desktop for a particular repository, type github followed by the path to the repository. You can also change to your repository path and then type github . to open that repository.


1 Answers

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 
like image 142
Smudge Avatar answered Sep 23 '22 14:09

Smudge