If I have a file on my local main branch that I want to test something on, and I:
Create a new local branch
Switch to that branch
Open the file and make changes
Close the file
Switch back to the main branch
Open the file on the main branch
My changes also show up on the main branch (not what I was expecting).
How do I keep my changes on a new branch separate from the main branch (until I decide to merge them)?
No, I think that was the problem. I just read an article saying “Switching branches carries uncommitted changes with you.” So I guess I just need to commit or stash before switching.