Github: how to checkout my own repository

前端 未结 2 424
情书的邮戳
情书的邮戳 2021-01-29 21:50

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 che

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 22:41

    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
    

提交回复
热议问题