title: What's the equivalent of hg pull and merge in git
body: <p>Coming from mercurial, I'm struggling a bit with the terminology and methods for git.  Here's the current situation:</p>
  
  <p>Both servers share the same repository.</p>
  
  <ul>
  <li>On Server 1 a developer committed a change to file.php.</li>
  <li>On Server 2 a developer committed a change to file.php. Same change, but different commit.</li>
  </ul>
  
  <p><em>I need to bring these changesets back in sync</em></p>
  
  <p>To resolve this in mercurial, I would run the 3 commands below from Server 2.  Any merge conflicts would get resolved in an editor or meld.</p>
  
  <pre><code>hg pull -u ssh://remote-server1//shared-repository
  hg merge
  hg commit -m "Branch Merge"
  </code></pre>
  
  <p>How do you do this with git?</p>
  
  <p><strong>What I've done</strong></p>
  
  <p>Using <a href="https://www.mercurial-scm.org/wiki/GitConcepts" rel="nofollow noreferrer">https://www.mercurial-scm.org/wiki/GitConcepts</a> as a guide, I attempted <code>git pull</code> however it fails since I have not run <code>git config</code>.  This repository is in production and shared by many, so I'm trying to avoid setting an username.</p>
  
  <p>Following <a href="https://stackoverflow.com/a/17713604/456645">https://stackoverflow.com/a/17713604/456645</a>, I ran this command:</p>
  
  <pre><code>git fetch ssh://remote-server1//shared-repository
  </code></pre>
  
  <p>It responds</p>
  
  <pre><code>From ssh://remote-server1//shared-repository
   * branch            HEAD       -&gt; FETCH_HEAD
  </code></pre>
  
  <p>I have yet to figure out how to properly run <code>git reset</code> in this situation.</p>
  
  <pre><code>git reset ssh://remote-server1//shared-repository/master 
  # FAILS (fatal: Invalid object name 'ssh'.)
  
  git reset origin/master
  # FAILS (fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.)
  
  git reset FETCH_HEAD/master
  # FAILS (fatal: ambiguous argument 'FETCH_HEAD/master': unknown revision or path not in the working tree.)
  </code></pre>
  
  <p>Looking further, I'm confused to only find a single branch</p>
  
  <pre><code>git branch -a
  * master
  </code></pre>
  
  <p>Just to be sure it wasn't auto-merged, I check the history</p>
  
  <pre><code>git log -n 3 
  # Here, I find the changesets that previously existed.  Nothing new
  </code></pre>
  
  <p>At this point, I don't even know what happens to the <code>git fetch</code>.  I see no evidence of the fetch.</p>