How do I create a new branch in git
to begin work on a new feature?
I want the new branch to be a duplicate of the current branch (ie, the new branch's HEAD should be the same as the current HEAD).
Question differentiation:
If you say
$ git checkout -b myFeatureBranch anotherBranch
It'll create myFeatureBranch
off of anotherBranch
. But if you say
$ git checkout -b myFeatureBranch
It'll create myFeatureBranch
off of the current branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With