Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/remote-git-tags
Get tags from a remote git repo. Using only JS. No git binary required.
https://github.com/sindresorhus/remote-git-tags
Last synced: 2 months ago
JSON representation
Get tags from a remote git repo. Using only JS. No git binary required.
- Host: GitHub
- URL: https://github.com/sindresorhus/remote-git-tags
- Owner: sindresorhus
- License: mit
- Created: 2014-09-20T23:39:17.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2022-07-09T03:33:47.000Z (over 2 years ago)
- Last Synced: 2024-04-13T16:33:39.198Z (8 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 49
- Watchers: 6
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
- Security: .github/security.md
Awesome Lists containing this project
- awesome-nodejs-cn - remote-git-tags - 从 git 远程仓库获取 tags (包 / 其他)
- awesome-nodejs - remote-git-tags - Get tags from a remote git repo. Using only JS. ![](https://img.shields.io/github/stars/sindresorhus/remote-git-tags.svg?style=social&label=Star) (Repository / Git)
- awesome-nodejs - remote-git-tags - Get tags from a remote git repo. Using only JS. No git binary required. - ★ 32 (Miscellaneous)
- awesome-node - remote-git-tags - Get tags from a remote git repo. (Packages / Miscellaneous)
- awesome-nodejs-cn - remote-git-tags - 从远程git repo获取标记. (目录 / 其他)
README
# 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](https://medium.com/@jalendport/what-exactly-is-your-shell-path-2f076f02deb4).
## Usage
```js
import remoteGitTags from 'remote-git-tags';console.log(await remoteGitTags('https://github.com/sindresorhus/remote-git-tags'));
//=> Map {'v1.0.0' => '69e308412e2a5cffa692951f0274091ef23e0e32', …}
```## API
### remoteGitTags(repoUrl)
Returns a `Promise>` with the Git tags as keys and their commit SHA as values.
#### repoUrl
Type: `string`
The URL to the Git repo.