When using git worktree, the `.git` is a file, not a directory. https://github.com/LedgerHQ/ragger/blob/7ad9d14db9e834d5db52c5a8a4b39bfe55d3fee3/src/ragger/utils/misc.py#L104