I need to create another branch from a past commit

2019-07-18 10:17发布

I have a Git repos that looks like this:

enter image description here

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?

标签: git xcode6.1
1条回答
一纸荒年 Trace。
2楼-- · 2019-07-18 10:52

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>.

查看更多
登录 后发表回答