0.1.0 • Published 9 years ago

git-working-directory v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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