Today I Learned

2024/04/20

git

That git will place a file with the (absolute?) path to the actual git dir if initialized with git init --separate-git-dir. This is intended as an FS-agnostic symlink.

The lesson here is to never assume repo/.git exists and is a directory; use

git rev-parse --absolute-git-dir

docs