Checks if the given directory is the root of a Git working tree.
Asks Git for the top-level directory of the working tree with git rev-parse --show-toplevel and compares it with
the given directory after resolving symbolic links in both paths. The roots of linked worktrees and submodules
count as roots; bare repositories, the .git directory and directories outside a repository do not.
Parameters
workingDir: string = ...
The directory to check. Defaults to the current working directory.
Checks if the given directory is the root of a Git working tree.
Asks Git for the top-level directory of the working tree with
git rev-parse --show-topleveland compares it with the given directory after resolving symbolic links in both paths. The roots of linked worktrees and submodules count as roots; bare repositories, the.gitdirectory and directories outside a repository do not.