Does creating a Git branch keep my uncommitted edits off the other branches?
TechnologyI created a branch called layout-test for my first website experiment. After editing a heading, I switched back to main without committing. The changed heading was still in the file, and I thought Git had mixed the two branches together.
Both branches had started at the same commit, and the switch completed without a warning. Git's documentation says switching doesn't require a completely clean working tree, although it normally stops if the operation would lose local changes. Git's switch documentation
I haven't pushed anything or tried a reset. How should I understand where this edit lives and preserve it on the branch I intended? I want to learn the distinction before using a command that throws something away.