GitHub从之前的提交中分离出一个回购 [英] GitHub fork a repo from previous commit

查看:82
本文介绍了GitHub从之前的提交中分离出一个回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GitHub上找到了一个仓库,我想分叉 - 但不是当前版本。



我想分叉回购,因为它有很多提交 - 这可能吗?回购没有标明任何发布,所以我不知道如何做到这一点。我明显可以复制代码,因为它在那个提交中,但我宁愿分叉,因为那时我可以将链接返回到原始的repo。

解决方案

你只能分叉当前的仓库。

您可以将分叉的存储库的主分支重置为先前的提交,从而有效地为您提供了一个几乎处于相同状态的存储库,就像您在此时分叉它一样。 / p>

请参阅:如何将github库回滚到特定的提交?


I've found a repository on GitHub I would like to fork - but not the current version.

I want to fork the repo as it was quite a few commits back - is this possible? The repo has not marked any releases, so I'm not sure how to do this. I could obviously copy the code as it was in that commit, but I would prefer to fork, as then I get the link back to the original repo.

解决方案

You can only fork the current repository.

You can reset the forked repository's master branch to an earlier commit though, effectively giving you a repository in almost the same state as if you had forked it at that point.

See: How can I rollback a github repository to a specific commit?

这篇关于GitHub从之前的提交中分离出一个回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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