git-working-directory

0.1.0 • Public • Published

NPM version Build Status Dependency Status

Find the working directories of a git repository on a local machine.

Install

$ npm install --save git-working-directory

Usage

var git-working-directory = require('git-working-directory');
 
git-working-directory('adamzr', 'git-working-directory', function(workingCopies){
  console.log(workingCopies);// Will print an array of absolute file paths to working copies of a given git repository
});

We search all sub-directories of your home directory looking for all git repositories, then we check the remote origin URL in each one to check if it is a working copy of the repository you are looking for. workingCopies will be an empty array if no working copies are found. This function can take a while to complete if you have a large home directory.

License

MIT © Adam Richeimer

Package Sidebar

Install

npm i git-working-directory

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • adamzr