GitHub 上的 Forking 和 Cloning 有什么区别? [英] What is the difference between Forking and Cloning on GitHub?

查看:24
本文介绍了GitHub 上的 Forking 和 Cloning 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道对项目进行 Fork 和对其进行 clone 的区别.

I'd like to know the differences between doing a Fork of a project and doing a clone of it.

如果我已经分叉了一个项目,我可以只通过 GitHub 发送拉取请求吗?

Can I only send pull requests via GitHub if I've forked a project?

推荐答案

基本上,是的.fork 只是请求 GitHub 克隆项目并在您的用户名下注册;GitHub 还会跟踪两个存储库之间的关系,因此您可以将两个项目(以及其他分支)之间的提交和拉取可视化.

Basically, yes. A fork is just a request for GitHub to clone the project and registers it under your username; GitHub also keeps track of the relationship between the two repositories, so you can visualize the commits and pulls between the two projects (and other forks).

您仍然可以请求人们从您克隆的存储库中提取,即使您不使用 fork - 但您必须自己处理使其公开可用.或者向开发人员发送补丁(参见 git format-patch),他们可以应用到他们的树上.

You can still request that people pull from your cloned repository, even if you don't use fork -- but you'd have to deal with making it publicly available yourself. Or send the developers patches (see git format-patch) that they can apply to their trees.

这篇关于GitHub 上的 Forking 和 Cloning 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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