title: Why is the folder that contains `.git` dir still associated in some ways with the main worktree folder when using separate git dir?
body: <p>After cloning a repo with the separate git dir option the root folder acts strange in git version <code>2.31.0</code>.</p>
  <pre><code>/local/repo&gt; git clone &lt;url&gt; --separate-git-dir=.git main
  </code></pre>
  <p>After this command, the dir structure is:</p>
  <pre><code>/local/repo
    /.git
    /main
  </code></pre>
  <p>For some commands the <code>/local/repo</code> still seems associated with the worktree at <code>/local/repo/main</code>. For example:</p>
  <hr />
  <p><strong>switch </strong></p>
  <pre><code>/local/repo&gt; git switch banana
  Switch to branch 'banana'
  D       a_file_in_the_repo.txt
  </code></pre>
  <p>It's possible to switch branch of the main working tree when standing at <code>/local/repo</code>, but when doing so <em>ALL</em> files in the repository are listed as deleted (<code>D</code>) (since they are not available with relative path from the current directory <code>/local/repo</code> I guess, but really <code>/local/repo/main</code> should have been used here I think?). Isn't this strange?</p>
  <hr />
  <p><strong>worktree list -v</strong></p>
  <pre><code>/local/repo&gt; git worktree list -v
  /local/repo       &lt;hash0&gt; [main]
  </code></pre>
  <p>Why is the worktree for main listed at <code>/local/repo</code> and not <code>/local/repo/main</code>?</p>
  <hr />
  <p><strong>branch -vv</strong></p>
  <pre><code>/local/repo&gt;git branch -vv
  main &lt;hash0&gt; [origin/main] &lt;commit message&gt;
  </code></pre>
  <p>Why is the local dir for worktree not printed when standing at <code>/local/repo</code>? Expected output:</p>
  <pre><code>/local/repo&gt;git branch -vv
  main &lt;hash0&gt; (/local/repo/main) [origin/main] &lt;commit message&gt;
  </code></pre>