_
我在bitbucket中有一个项目,我想从中克隆特定的提交 这些是提交,我想要没有最后两个提交
I have an project in bitbucket and I want to clone specific commit from it these are the commits, I want without the last two of them
但是在SourceTree中,我看不到提交号b6981f9和1fb876a 仅最后一个数字da84f64
butin SourceTree I can't see the commits number b6981f9 and 1fb876a just the last number da84f64
我认为由于最后三个因素在一起,我该怎么办?
I think because the last 3 pushed together, what I should do?
推荐答案
是的,我想要除了最后2次提交之外的整个存储库,我不需要它,那么我如何指定该克隆?
yes I want the whole repository except the last 2 commits, I don't need it, so how I can specific that cloning?
通常的方法是:
- 克隆所有内容
-
签出一个新分支(或重置当前分支)到HEAD~2
除此之外:
- 浅克隆允许您获取最后n次提交(这不是您想要的)
- 稀疏签出与子文件夹(而不是子提交)有关
- 获取单个提交将不会得到所有提交,但会得到一些提交.
- shallow clone allows you to get the last n commits (which is not what you want)
- sparse checkout is about subfolders (not sub-commits)
- fetch single commit would not get all commits but some.
我在项目中有合作伙伴,但最近2次提交中存在错误
I have partners in project but we got bug in the last 2 commits
因此,使用SourceTree:
So, with SourceTree:
- 克隆存储库(普通克隆)
- 选择您要使用的提交:双击提交以将其检出,然后单击分支".
创建新分支后,进行工作并添加新的提交,然后推送错误修正分支.
Once you have created an new branch, work and add new commits, then push your bugfix branch.
更多推荐
克隆特定的提交位桶
发布评论