How to create the branch from specific commit in different branch

前端 未结 5 557
旧时难觅i
旧时难觅i 2021-01-29 22:14

I have made several commits in the master branch and then merged them to dev branch.

I want to create a branch from a specific commit in dev branch, which was first comm

5条回答
  •  你的背包
    2021-01-29 22:56

    You can do this locally as everyone mentioned using

    git checkout -b  
    

    Alternatively, you can do this in github itself, follow the steps:

    1- In the repository, click on the Commits.

    2- on the commit you want to branch from, click on <> to browse the repository at this point in the history.

    3- Click on the tree: xxxxxx in the upper left. Just type in a new branch name there click Create branch xxx as shown below.

    Now you can fetch the changes from that branch locally and continue from there.

提交回复
热议问题