title: Git: pull from remote but keep local commits
body: <p>For example: there is a local and remote repo with two files:</p>
  
  <pre><code>1.txt
  2.txt
  </code></pre>
  
  <p>Developer #1 edits <code>1.txt</code> locally and commits the changes without pushing them to remote repo.</p>
  
  <p>Later, developer #2 sends pull request with edited <code>2.txt</code>, and it gets merged in main remote repo.</p>
  
  <p>My question is: how can developer #1 pull <code>2.txt</code> from remote repo, and keep changes to <code>1.txt</code>?</p>
  
  <p>When I try to do this, extra commit is added after <code>1.txt</code> edit, so it looks like this:</p>
  
  <ul>
  <li>14:00 <code>2.txt</code> commit from developer #2</li>
  <li>15:00 <code>1.txt</code> commit from developer #1</li>
  <li>16:00 <code>Merge branch "master" of https://github...</code> (<code>2.txt</code> commit again)</li>
  </ul>
  
  <p>Thank you.</p>