-2

I have some commits on my master branch. I want to create another branch which includes just two first commits in masters branch.how can I do this ?

Afsanefda
  • 3,069
  • 6
  • 36
  • 76

1 Answers1

1

Assume you have a repository like in the image below enter image description here

If you want create the newbranch at the a5d0f81 commit as shown in the image.

git checkout -b newbranch a5d0f81

should work as show in the picture.

enter image description here

Vincent
  • 415
  • 4
  • 9