title: Uncommited changes persist in checkout, generate no warnings
body: <p>I'm getting some strange behavior from git. Previously, if I made some changes on <code>branch_A</code>, did not commit, and tried <code>git checkout branch_B</code>, I got a warning to commit or stash my changes first, and then after I did so, I could checkout <code>branch_B</code> and it worked fine.</p>
  
  <p>All of a sudden, this has stopped working, in a number of distressing ways. Here is what I mean:</p>
  
  <p>I have uncommited changes on <code>branch A</code>, e.g.</p>
  
  <pre><code>
  (venv) Georges-MacBook-Pro% git branch
  * branch_A
    branch_B
  (venv) Georges-MacBook-Pro% git status
  On branch branch_A
  Changes to be committed:
    (use "git reset HEAD ..." to unstage)
  
      modified:   file1.py
  
  Changes not staged for commit:
    (use "git add ..." to update what will be committed)
    (use "git checkout -- ..." to discard changes in working directory)
  
      modified:   file2.py
  
  Untracked files:
      ...
  
  (venv) Georges-MacBook-Pro% git diff
  diff --git a/file2.py b/file2.py
  index 62a513c..da6dbc5 100644
  --- a/file2.py
  +++ b/file2.py
  @@ -33,7 +33,7 @@ def foo():
  
   @pytest.fixture
   def foo():
  -    f = "old_string"
  +    f = "new_string"
       return f
  
  </code></pre>
  
  <p>so when I try to do this, it shouldn't work, but it does:</p>
  
  <pre><code>
  (venv) Georges-MacBook-Pro% git checkout branch_B
  M   file1.py
  M   file2.py
  Switched to branch 'branch_B'
  Your branch is up-to-date with 'origin/branch_B'.
  </code></pre>
  
  <p>and <code>git status</code> and <code>git diff</code> look exactly the same. Which they undoubtedly should not. </p>
  
  <p>I'd really appreciate any insight into what I screwed up and how to fix it. I'm relatively new to git and I haven't done much besides the very basic pull push checkout -b. </p>