All Projects → sindresorhus → Remote Git Tags

sindresorhus / Remote Git Tags

Licence: mit
Get tags from a remote git repo. Using only JS. No git binary required.

Programming Languages

javascript
184084 projects - #8 most used programming language

remote-git-tags

Get tags from a remote Git repo

Install

$ npm install remote-git-tags

The git binary must be installed and in your PATH.

Usage

const remoteGitTags = require('remote-git-tags');

(async () => {
	console.log(await remoteGitTags('https://github.com/sindresorhus/remote-git-tags'));
	//=> Map {'v1.0.0' => '69e308412e2a5cffa692951f0274091ef23e0e32', …}
})();

API

remoteGitTags(repoUrl)

Returns a Promise<Map<string, string>> with the Git tags as keys and their commit SHA as values.

repoUrl

Type: string

URL to the Git repo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].