Fix Git detection with .git files