This function recursively ascends the filesystem tree from the
given directory until it either finds a directory .git, or
the top-level directory to abort the search.
Usage
inGit(cwd = getwd())
Arguments
cwd
The start directory, default to the current working
directory
Value
A boolean value indicating whether or not the given
directory is, in fact, in a git repository.