1.0.1 • Published 8 years ago

git-remote-url v1.0.1

Weekly downloads
122
License
Apache-2.0
Repository
github
Last release
8 years ago

git-remote-url

Get a remote URL of a git repository

Build Status dependencies devdependencies

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);
});