I understand that a command to start a new branch is
git checkout -b <mybranch>
However, that assumes I had the foresight to have created the new branch before making the new changes that I want to commit.
Usually however that's not the case. Usually, I start coding, then may or may not do git add .
then want to commit in a new branch. How do I do that?