title: Git checkout and merge without touching working tree
body: <p>Say I have a feature branch, into which I merge upstream changes prior to pushing my changes back:</p>
  
  <pre><code>git branch feature1
  ... [edit my code]
  ... [commit]
  git fetch origin master
  git merge fetch_head [or rebase]
  ... [resolve conflicts]
  ... [build and test code]
  </code></pre>
  
  <p>At this point I wish to push my changes. The normal way of doing this would be:</p>
  
  <pre><code>git checkout master [changes a bunch of working tree files]
  git merge feature1  [changes the same files right back]
  </code></pre>
  
  <p>This works fine, but will make the (date-checking) compiler think that a whole bunch of files are dirty and needs a rebuild even though the contents are the same. Is there a way to checkout-and-merge that leaves the working tree unchanged in this case? </p>
  
  <p>Something like:</p>
  
  <pre><code>git checkout master --merge-branch feature1
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I am only talking about fast forward merges that by definition would not change the state of the files.</p>