I'm confused with an encountered Git behaviour - when I edit some stuff and checkout
to another branch (e.g. master
), I get:
M some_script.py
Switched to branch 'master'
The file stays modified, and I can commit it on the second branch.
What's the reason of such a behaviour, how I turned that on (I'm used to being forced to stash
the changes), and how to avoid it?