git-remote-url
v1.0.1
Published
Get a remote URL of a git repository
Downloads
1,304
Readme
git-remote-url
Get a remote URL of a git repository
API
The function exported by the module accepts two parameters:
directory
: the directory of the git repository;remote
: the name of the remote you're interested in.
It returns a promise that resolves to the URL of the remote.
Example
var gitRemoteUrl = require('git-remote-url');
gitRemoteUrl('.', 'origin').then(function(url) {
console.log('URL is ' + url);
});