I need to create another branch from a past commit

牧云@^-^@ 提交于 2019-12-11 03:03:57

问题


I have a Git repos that looks like this:

I want to create a new branch from the highlighted commit. (It's a long story, but basically I want to submit the iOS app while working out kinks in the latest branch). I'm pretty sure this is possible, just don't know how to accomplish it... in addition, I don't see any way of using 'tags' in XCode 6.1.. is it available, just not documented?


回答1:


You can do as (Check git-checkout(1) Manual Page documentation)

git checkout -b|-B <new_branch> [<start point>]
  • <start_point>:

The name of a commit at which to start the new branch; see git-branch(1) for details. Defaults to HEAD.

  • -b <new_branch>:

Create a new branch named <new_branch> and start it at <start_point>.

  • -B <new_branch>:

Creates the branch <new_branch> and start it at <start_point>; if it already exists, then reset it to <start_point>.



来源:https://stackoverflow.com/questions/27747280/i-need-to-create-another-branch-from-a-past-commit

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