added helper to get GitDir from a subdir of the root