commit to a new branch code example
Example 1: commit to a new branch
git checkout -b your-new-branch
git add
git commit -m
First, checkout your new branch.
Then add all the files you want to commit to staging.
Lastly, commit all the files you just added.
You might want to do a git push origin your-new-branch afterward so your changes show up on the remote.
Example 2: make a new branch git
git checkout -b branch-name