Trying to pull files from my Github repository: "refusing to merge unrelated histories"
<p>I'm learning git, and I'm following the Git community book. </p>

<p>Previously (long time ago) I made a public repository on Github, with some files. Now I set up a local Git repository on my current computer, and committed some files. Then I added a remote pointing to my Github page:</p>

<pre><code>[root@osboxes c]# git remote add learnc https://github.com/michaelklachko/Learning-C
</code></pre>

<p>That seemed to be successful: </p>

<pre><code>[root@osboxes c]# git remote show learnc
* remote learnc
  Fetch URL: https://github.com/michaelklachko/Learning-C
  Push  URL: https://github.com/michaelklachko/Learning-C
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (local out of date)
</code></pre>

<p>Now I want to download the files from my Github repo to my computer. I did this:</p>

<pre><code>[root@osboxes c]# git fetch learnc
[root@osboxes c]# git merge learnc/master
warning: refname 'learnc/master' is ambiguous.
Already up-to-date.
</code></pre>

<p>However, I don't see any new files in my local directory. How can I get them? </p>

<p>I also tried to do this:</p>

<pre><code>[root@osboxes c]# git pull learnc master
From https://github.com/michaelklachko/Learning-C
 * branch            master     -&gt; FETCH_HEAD
fatal: refusing to merge unrelated histories
</code></pre>

<p>BTW, locally I'm on master branch (there are no other branches):</p>

<pre><code>[root@osboxes c]# git status
On branch master
nothing to commit, working directory clean
</code></pre>