Package Exports
- find-git-root
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (find-git-root) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
find-git-root
Recursively find the closest .git/
and return repo path
Installation
$ npm install find-git-root
Usage
'use strict'
const findGitRoot = require('find-git-root')
// git clone url /home/you/repo
const root = findGitRoot('/home/you/repo/somedir/somefile')
// => /home/you/repo/.git
const root = findGitRoot('/home/you/repo/somedir')
// => /home/you/repo/.git