[英]Remotely Fork Github Repository
From my local machine ( Windows 10 ) using the command-line, can I fork someone else repository without having to use the Fork button on the site? 我可以使用命令行从本地计算机( Windows 10 )上分叉其他存储库,而不必使用站点上的“ 分叉”按钮吗?
I'm wanting to create a setup script that forks a repository remotely on Github to a remote Github repository within my account, then git clone
the forked repository to my local machine. 我想创建一个安装脚本,将Github上的存储库远程派生到我帐户内的远程Github存储库,然后
git clone
将分叉的存储git clone
到本地计算机。
Unfortunately, "Forking" is not actually a git function. 不幸的是,“分叉”实际上不是git函数。
By this I mean that without extra plugins or scripts, git by itself does not have a function "fork", nor does it know how to ask the remote how to do a fork. 我的意思是,没有额外的插件或脚本,git本身就没有“ fork”功能,也不知道如何问遥控器如何做fork。
Instead, this is purely a function that the hosting partner provides, usually through its web user interface. 相反,这纯粹是托管合作伙伴通常通过其Web用户界面提供的功能。
However, GitHub have a REST API , and with it you can instruct GitHub to manage forks . 但是,GitHub有REST API ,您可以使用它指示GitHub 管理forks 。
As such, I think your best way forward would be to either find a script or plugin or program that asks GitHub to do this fork, or build one yourself using this REST API. 因此,我认为最好的方法是找到一个脚本或插件或程序,要求GitHub进行此分叉,或使用此REST API自己构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.