**Steps to reproduce (assumes GIT >= 2.5 and a repo with at least 2 branches)** - `git checkout <whatever>` - `git worktree add /tmp/foo another_branch` - go to `/tmp/foo` - execute: `import git; git.Repo('.')` in Python - results in `git.exc.InvalidGitRepositoryError`