title: How can I set up the remotes in my original repository as if it was cloned?
body: <p>I have created a Git repository locally and committed a file to it:</p>
  
  <pre><code>$ mkdir blarg &amp;&amp; cd blarg
  
  $ git init
  Initialized empty Git repository in /home/myuser/tests/blarg/.git/
  
  $ echo a line &gt; test.txt
  
  $ git add .
  
  $ git commit -m "initial commit"
  [master (root-commit) f47ef6d] initial commit
  1 file changed, 1 insertion(+)
  create mode 100644 test.txt
  </code></pre>
  
  <p>I want my server to host this repository, so I have created a bare empty repository there and configured access to it (this part works fine). I can set this repository as a remote in my local repo and push to it:</p>
  
  <pre><code>$ git remote add --track master origin https://git.example.net/repos/blarg.git
  
  $ git remote -v
  origin  https://git.example.net/repos/blarg.git (fetch)
  origin  https://git.example.net/repos/blarg.git (push)
  
  $ git push origin master
  Enumerating objects: 3, done.
  Counting objects: 100% (3/3), done.
  Writing objects: 100% (3/3), 216 bytes | 216.00 KiB/s, done.
  Total 3 (delta 0), reused 0 (delta 0)
  To https://git.example.net/repos/blarg.git
  * [new branch]      master -&gt; master
  
  $ git pull
  Already up to date.
  
  $ git status
  On branch master
  nothing to commit, working tree clean
  
  $ git log --oneline
  f47ef6d (HEAD -&gt; master, origin/master) initial commit
  </code></pre>
  
  <p>This all seems to work as intended. However, after cloning this repository from the server into a new directory, the <code>git status</code> message is slightly different in the cloned repo, and <code>git log</code> also shows one more ref than in the original repo:</p>
  
  <pre><code>$ cd ..
  
  $ git clone https://git.example.net/repos/blarg.git blarg2
  Cloning into 'blarg2'...
  remote: Enumerating objects: 3, done.
  remote: Counting objects: 100% (3/3), done.
  remote: Total 3 (delta 0), reused 0 (delta 0)
  Unpacking objects: 100% (3/3), done
  
  $ cd blarg2
  
  $ git status
  On branch master
  Your branch is up to date with 'origin/master'.
  
  nothing to commit, working tree clean
  
  $ git log --oneline
  f47ef6d (HEAD -&gt; master, origin/master, origin/HEAD) initial commit
  </code></pre>
  
  <p>Note that git only prints <em>"Your branch is up to date with 'origin/master'."</em> in the cloned repository, and that the log there mentions <code>origin/HEAD</code>.</p>
  
  <p>What's going on, and how can I adjust my original repo to behave like the cloned one?</p>