title: How to create new local branch in Git?
body: <p>I am working on a project which I cloned from a remote repo hosted on Gitlab. I made some changes to the project but didnt create any branch and want to now start work on some other new features, but without first pushing my existing work to the remote repo. I might discard the changes in the new feature or might need to push both the new feature as well as the earlier changes to the remote repo, at a later stage.</p>
  <p>From what I know about Git, I think I need to create a new local branch, which I can do using <code>git checkout -b NEW_BRANCH_NAME</code>. Is this the correct way to accomplish what I am trying to do?  When this command, creates a new branch, how do I switch back and forth between working on this new branch and the earlier one?</p>