I have a git repo with several branches. Usually, if I make changes in one branch, and attempt to switch to another branch, git tells me that I have to commit or discard the changes before I can switch branch.
Today, I modified a file in branch A and typted git checkout master
in order to switch to master branch. And git just, without any warning, copied all changes from branch A to the master branch.
Why does this no longer work properly?