Yep, @Priyadapanicker nailed the basics. Just to add from my experience working on multiple features at once—sometimes you want to git create branch without dragging along the mess of uncommitted changes from your current state. Here’s what I usually do:
git stash
git checkout -b new-feature
That stashes your current changes temporarily and gives your new branch a clean slate. Then you can decide whether to reapply the changes later using:
git stash pop
I’ve found this super helpful when my work-in-progress doesn’t quite fit the new branch I’m starting. Keeps things tidy and focused.