Let's say we have two branch "master" and "feature".
Usually, when I am on master branch with some changes, and I want to swtich to "feature" by "git checkout feature". Then I would get the warning "commit the local changes".
But for this Gitlab project that I am working on, this behavior is allowed.
git checkout master
M README.md
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
What happened here? And how to prevent this behavior? I cannot live with it because in this way, the separation between branches is gone.
I wonder if it has something to do with the "M" before README.md, or some git configurations, or gitlab.