Fork , in the GitHub context, doesn't extend Git.
(在GitHub上下文中, Fork不会扩展Git。)
It only allows clone on the server side.
(它只允许在服务器端克隆。)
When you clone a GitHub repository on your local workstation, you cannot contribute back to the upstream repository unless you are explicitly declared as "contributor".
(在本地工作站上克隆GitHub存储库时,除非明确声明为“贡献者”,否则无法返回上游存储库。)
That's because your clone is a separate instance of that project. (那是因为你的克隆是该项目的一个单独的实例。)
If you want to contribute to the project, you can use forking to do it, in the following way: (如果您想为项目做出贡献,可以通过以下方式使用分叉来执行此操作:)
- clone that GitHub repository on your GitHub account (that is the "fork" part , a clone on the server side)
(克隆你的GitHub帐户上的GitHub存储库(即“fork”部分 ,服务器端的克隆))
- contribute commits to that GitHub repository (it is in your own GitHub account, so you have every right to push to it)
(贡献对GitHub存储库的提交(它在你自己的GitHub帐户中,所以你有权利推送它))
- signal any interesting contribution back to the original GitHub repository (that is the "pull request" part by way of the changes you made on your own GitHub repository)
(将任何有趣的贡献发送回原始的GitHub存储库(即通过您在自己的GitHub存储库上所做的更改的“拉取请求”部分 ))
Check also " Collaborative GitHub Workflow ".
(另请参阅 “ Collaborative GitHub Workflow ”。)
If you want to keep a link with the original repository (also called upstream), you need to add a remote referring that original repository.
(如果要保留与原始存储库(也称为上游)的链接,则需要添加引用该原始存储库的远程数据库。)
See " What is the difference between origin and upstream on GitHub? "
(请参阅“ GitHub上的源和上游有什么区别? ”)
![叉和上游](https://stackoom.com/link/aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS95UEtYVS5wbmc=)
And with Git 2.20 (Q4 2018) and more, fetching from fork is more efficient, with delta islands .
(使用Git 2.20(2018年第四季度)以及更多, 使用delta岛更有效率。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…