Scenario:
- Working on branch
test-bootstrap
- Make changes to file
bootstrap.sh
- run
git checkout master
Now when I'm on master
I see my uncommitted changes from the test-bootstrap
branch on master
.
This is is strange to me because I whenever I used to do this in the past, I would get an error message along the lines, of "can't checkout master, please commit your changes". Essentially, I was prevented from checking out a new branch until my changes were committed.
How can I make it so that checking out a new branch when i have uncommitted changes on my current branch is prevented?