Resolves the remote url of the local git repository in the current folder.
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

resolve-git-remote build status

Resolves the remote url of the local git repository in the current folder.

npm install resolve-git-remote
var remote = require('resolve-git-remote');

remote(function (err, remote) {
  // err will be set if no remote was found
  console.log(remote);  // => 'thlorenz/resolve-git-remote'
});

Disclaimer

Code lifted from travisify.