git-origin-url
Version:
Retrieve the git remote origin URL of the current repo.
32 lines (18 loc) • 969 B
Markdown
# git-origin-url
[](https://travis-ci.org/wilmoore/node-git-origin-url) [](https://www.npmjs.org/package/git-origin-url) [](https://www.npmjs.org/package/git-origin-url) [](license)
> Retrieve the git remote origin URL of the current repo for [Node.js][].
## Example
var origin = require('git-origin-url');
origin(function (err, url) {
if (err) throw err;
console.log(url);
});
//=> https://github.com/wilmoore/node-git-origin-url.git
## Installation
$ npm install git-origin-url
## Inspiration
- [resolve-git-remote][]
## License
[MIT](license)
[resolve-git-remote]: https://github.com/thlorenz/resolve-git-remote
[Node.js]: http://nodejs.org