Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
this walks a path or paths, finds all of the git repositories, and their origins
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
findrepos.js
package.json
readme.md

readme.md

Build Status

find-git-repos

this walks a path or paths, finds all of the git repositories, and their origins

example

callback style

var findrepos = require('find-git-repos');

findrepos('../',function(err,repos){
  console.log('all of my repos! ',repos);
});

event emitter style

// with event emitter

var em = findrepos('../../');

em.on('repo',function(repo,remote){
  console.log('found repo ',remote,' at ',repo);
});

em.on('end',function(){
  console.log('all done!');
})

em.on('error',function(){
  console.log('the path i specified must not exist or is in accesible');
});

api

findrepos(path or an array of paths,callback)

  • returns EventEmitter finder
  • callback(err,repos) repos is an object keyed off of the directory with the remote origin as the values

emitter events repo the repostory info (repo dir, repo remote)

end im done looking no arguments

error if any paths are inaccessable (the error)

Something went wrong with that request. Please try again.