git-remote-origin-url

Get the remote origin URL of a Git repository

MIT 9 个版本
安装
npm install git-remote-origin-url
yarn add git-remote-origin-url
pnpm add git-remote-origin-url
bun add git-remote-origin-url
README

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());
//=> 'git@github.com: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.
版本列表
4.0.0 2021-09-10
3.1.0 2020-02-22
3.0.0 2019-04-06
2.0.0 2016-01-12
1.1.2 2015-08-22
1.1.1 2015-02-16
1.1.0 2014-12-05
1.0.0 2014-08-14
0.1.1 2014-02-25