问题描述
我在GitHub上找到了一个仓库,我想分叉 - 但不是当前版本。
我想分叉回购,因为它有很多提交 - 这可能吗?回购没有标明任何发布,所以我不知道如何做到这一点。我明显可以复制代码,因为它在那个提交中,但我宁愿分叉,因为那时我可以将链接返回到原始的repo。
你只能分叉当前的仓库。
您可以将分叉的存储库的主分支重置为先前的提交,从而有效地为您提供了一个几乎处于相同状态的存储库,就像您在此时分叉它一样。 / p>
请参阅:
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从之前的提交中分离出一个回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!