叉子和分支在github上的区别 [英] difference between fork and branch on github

查看:363
本文介绍了叉子和分支在github上的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我分叉了一个在github上托管的项目。我是否将所有分支分叉?我怎么知道我的fork是基于哪个分支?换句话说哪个分支将被下载到我的PC?

解决方案

GitHub上的所有分支都将被复制到分支中。 (显然,这不包括从未推到GitHub的分支。)

但是fork是GitHub-to-GitHub操作;没有任何东西被复制到您的PC。它与Git clone 不太一样。如果您的意思是问克隆项目时复制了什么内容?,请参阅 git-clone(1)


If I fork a project that's hosted on github. Do I fork all the branches? How do I know which branch my fork is based on? In other words which branch will be downloaded to my PC?

解决方案

All branches on GitHub will be copied in a fork. (Obviously, this doesn’t include branches that were never pushed to GitHub in the first place.)

But a fork is a GitHub-to-GitHub operation; nothing is copied to your PC. It’s not quite the same as a Git clone. If you mean to ask "what’s copied when I clone a project?", see the manual for git-clone(1).

这篇关于叉子和分支在github上的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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