From: Mike Hommey Date: Fri, 12 Feb 2016 03:47:23 GMT Subject: `git rev-parse --git-common-dir` doesn't work in a subdirectory of the main work tree Message-ID: <20160212034723.GA20739@glandium.org> Hi, In a worktree, git rev-parse --git-common-dir returns the non worktree-specific git directory. e.g. .git instead of .git/worktrees/name. The problem is that while it returns the right thing from a subdirectory of a worktree, it doesn't from a subdirectory of the "main" work tree. In the latter case it returns ".git" instead of the full path to it. Mike