Not Pictured: Mangoes

    find-git-root
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    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

    Keywords

    Install

    npm i find-git-root

    DownloadsWeekly Downloads

    80,882

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    4.01 kB

    Total Files

    7

    Last publish

    Collaborators

    • banyudu