If you haven’t commited your changes yet, you can switch to a new branch prior to committing.
git checkout -b my-new-branch
This will create a new branch called my-new-branch and immediately check it out.
If you haven’t commited your changes yet, you can switch to a new branch prior to committing.
git checkout -b my-new-branch
This will create a new branch called my-new-branch and immediately check it out.