clone specific commit bitbucket

天涯浪子 提交于 2019-12-01 10:52:51
VonC

yes I want the whole repository except the last 2 commits, I don't need it, so how I can specific that cloning?

The normal way is to:

  • clone everything
  • checkout a new branch (or reset the current branch) to HEAD~2

    git checkout -b newBranch @~2
    

Other than that:

I have partners in project but we got bug in the last 2 commits

So, with SourceTree:

  • clone the repo (normal clone)
  • select the commit from which you want to work: double-click the commit to check it out, then click 'Branch'.

Once you have created an new branch, work and add new commits, then push your bugfix branch.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!