Github:如何检出我自己的存储库 [英] Github: how to checkout my own repository

查看:136
本文介绍了Github:如何检出我自己的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我创建了一个GitHub仓库,并从我的计算机中推送它。



如何检出我自己的存储库?我应该为其他人的存储库分叉吗?

尽管如此,在我看来,分叉我自己的存储库看起来有些蠢。

解决方案

在项目页面( http://github.com/you/project )项目工具列表底部的右侧会出现一个链接,其中包含一个.git repo路径



打开终端并键入:

  git clone [link to repo here] 

这会创建一个你可以使用的repo的本地克隆,然后如果你按照GitHub上的指示添加一个远程服务器,你可以把你的修改重新加载回来。



同步文件的前进和后退同样简单;



计算机A(有原始的git回购)

计算机B(有克隆的回购)


在计算机A上进行一些更改,然后运行

  git push origin master 

转到计算机B,然后运行

  git pull origin master 

code>

要同步新的更改,请在计算机B上进行一些更改,然后将其推回

  git push origin master 


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.

解决方案

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

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

这篇关于Github:如何检出我自己的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆