gitRoot(filepath)
gitRoot(); // /home/tim/projects/firost
gitRoot(
'~/projects/aberlaas/lib/main.js'
); // /home/tim/projects/aberlaas/
This checks for the closest .git/
directory up the file structure, so it might
not work when using git submodules as they have their own .git/
directory.