title: Why does Git show my local "pull from remote" when I push my commit to the remote repo?
body: <p>So I am having a little trouble understanding Git.  I'm using it on Windows, with a remote (GitLab installed) repo.  I have a local copy of the master branch, and I am fairly diligent about using <code>git pull</code> frequently to keep my local copy up-to-date.  </p>
  
  <p>So it's release time (of course...isn't that when this happens?) and I want to check in the ONE file I've changed.  I type a <code>git pull</code> but get an error: </p>
  
  <pre><code>error: Your local changes to the following files would be overwritten by merge:
          &lt;path&gt;/filename.py
  Please, commit your changes or stash them before you can merge.
  Aborting
  </code></pre>
  
  <p>I use <code>git diff</code> and sure enough, another developer fixed a typo in the same spot where I'm trying to commit.  A quick <code>git status</code> reveals:</p>
  
  <pre><code>Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded
  </code></pre>
  
  <p>So, at a loss, I commit my changes to my local repo.</p>
  
  <pre><code>git add &lt;filename&gt;
  git commit -m "reworking to ignore logs"
  </code></pre>
  
  <p>Now, I can <code>git pull</code> successfully.</p>
  
  <pre><code>git pull origin master 
  ...
  Merge made by the 'recursive' strategy
  file1
  file2...
  ....
  &lt;filename&gt;
  5 files changed, 1 insertion, 63 deletions...
  </code></pre>
  
  <p>Now, I'm able to push my change up to the remote repo</p>
  
  <pre><code>git push
  </code></pre>
  
  <p>BUT: here's my question.  On the remote server, it shows BOTH my commit AND the file changes caused by my local <code>pull</code> after my commit.  That is to say, it basically shows that the remote files changed, but in fact changed to what wass <strong>ALREADY in</strong> the remote repository.  </p>
  
  <p>My boss calls in a panic, asking me why I changed all those (other four) files, and I'm not able to answer.  We end up checking out the two commits (current and pre-my-changes) and diffing them, to prove that it was ONLY my one file's change is what is different, before we both breathe a sigh of relief.</p>
  
  <p>So my question is:  what am I missing?  Why should Git think that I want to see that I changed files to match the remote HEAD, in the remote?  I have seen <a href="https://stackoverflow.com/questions/6934752/git-combining-multiple-commits-before-pushing">this question about <code>git squash</code>ing</a>, and realize that there is a <code>git rebase</code> which may help me, too.  Can someone help me understand why Git does this?  I just feel as though I am not totally embracing the "distributed" paradigm shift.</p>