There will never be a last question on this :) It has taken me years to develop the skills on how to manage projects in git and I still learn new stuff when I have to do something that is not my typical workflow.
Life becomes much more complicated when you are managing changes from other developers rather than just working on one project by yourself.
So don’t worry about asking questions, I’m here for you. If we got enough people interested, I might even form a group to teach and where we can all collaborate.
As for your question. I think I understand. You made changes on “newBranch”, but then you want to switch back to the master branch. I assume you now want to incorporate those changes onto the master branch?
You would do what is called a rebase or a merge. I’m partial to doing rebases because it keeps your history linear, but that isn’t always the best solution when multiple people work on a project.
Branches are cheap, you can create them when and wherever you like. Just make sure to clean them up so you don’t end up with a mess, it can get confusing quickly.
I always have a master branch for a project, that’s the standard of what branch is considered “releasable.” So that is what is checked out on my server for the code that is live for websites, or a released version of an application. But you can also add tags that make sure you know what version a particular commit went out on. I’m getting close to tagging a commit with v1.0.0 for Nomatyk Media Manager!