s="paragraph">
<p>Within a linked working tree, $GIT_DIR is set to point to this private
directory (e.g. <code>/path/main/.git/worktrees/test-next</code> in the example) and
$GIT_COMMON_DIR is set to point back to the main working tree&#8217;s $GIT_DIR
(e.g. <code>/path/main/.git</code>). These settings are made in a <code>.git</code> file located at
the top directory of the linked working tree.</p>
</div>
<div class="paragraph">
<p>Path resolution via <code>git rev-parse --git-path</code> uses either
$GIT_