title: fatal: refusing to merge unrelated histories after adding git remote
body: <p>I've added a remote repository to the folder where I am working with : </p>
  
  <pre><code>git remote add origin https://github.com/&lt;username&gt;/&lt;repo&gt;.git
  </code></pre>
  
  <p>If I type:</p>
  
  <pre><code>git pull origin master
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>From https://github.com/&lt;username&gt;/&lt;repo&gt;
      * branch            master     -&gt; FETCH_HEAD
  fatal: refusing to merge unrelated histories
  </code></pre>
  
  <hr>
  
  <p>I have also tried:</p>
  
  <pre><code>$ git pull origin master --allow-unrelated-histories
  </code></pre>
  
  <p>But I get:</p>
  
  <pre><code>From https://github.com/...
      * branch            master     -&gt; FETCH_HEAD
  error: Your local changes to the following files would be overwritten by merge:
      &lt;files&gt;
  Please commit your changes or stash them before you merge.
  Aborting
  </code></pre>