git-remote-origin-url
v4.0.0 git config url repo remote origin
git-remote-origin-url
Get the remote origin URL of a Git repository
Install
$ npm install git-remote-origin-url
Usage
import gitRemoteOriginUrl from 'git-remote-origin-url';
console.log(await gitRemoteOriginUrl());
//=> '[email protected]:sindresorhus/git-remote-origin-url.git'
gitRemoteOriginUrl(options?)
options
Type: object
cwd
Type: string
Default: process.cwd()
The current working directory.
remoteName
Type: string
Default: 'origin'
The Git remote name.
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
npm i git-remote-origin-url
Metadata
- MIT
- ^12.20.0 || ^14.13.1 || >=16.0.0
- Sindre Sorhus
- released 9/10/2021