Skip to content

VishnuTSuresh/git-root-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Root Path

This npm module allows you to get the root path of a git repository.

Installation

$ npm install git-root-path

Usage

var gitRootPath = require("git-root-path");

// You can pass a folder name to find the root of the repository
var path = gitRootPath("/root/gitrepo/path/to/folder");
// /root/gitrepo

// If you don't pass any arguments then the current folder is taken
var path = gitRootPath();

About

Finds the parent directory which is the root of the git repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published