https://github.com/aichbauer/node-tagged-git-commit
A tool to return tagged git commits
https://github.com/aichbauer/node-tagged-git-commit
commit git is-git nodejs repo tagged
Last synced: 4 months ago
JSON representation
A tool to return tagged git commits
- Host: GitHub
- URL: https://github.com/aichbauer/node-tagged-git-commit
- Owner: aichbauer
- License: mit
- Created: 2017-05-15T20:55:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-30T15:37:31.000Z (about 8 years ago)
- Last Synced: 2025-03-04T20:40:52.464Z (4 months ago)
- Topics: commit, git, is-git, nodejs, repo, tagged
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tagged-git-commit
Get the commit hash and refs/tag of tagged commits, remote and local
[](https://travis-ci.org/aichbauer/node-tagged-git-commit)
[](https://ci.appveyor.com/project/rudolfsonjunior/node-tagged-git-commit-xnpik/branch/master)
[](https://coveralls.io/github/aichbauer/node-tagged-git-commit?branch=master)## Installation
```sh
$ npm i tagged-git-commit --save
```
or
```sh
$ yarn add tagged-git-commit
```## Usage
Returns an array of the commit hashes.
```js
const taggedCommits = require('tagged-git-commit');// the latest local tagged commit hash from process.cwd()
taggedCommits();// the latest local tagged commit hash from the repo './path/to/repo'
taggedCommits({
path: '.path/to/repo',
});// the latest 5 local tagged commit hashes from process.cwd()
taggedCommits({
lookBehind: 5,
});// the latest tagged commit from process.cwd() from remote origin
taggedCommits({
local: false,
});// the latest tagged commit from process.cwd() from remote anotherOrigin
taggedCommits({
local: false,
remote: 'anotherOrigin'
});// the latest 3 tagged commit hashes from the repo './path/to/repo' from the remote origin
taggedCommits({
path: './path/to/repo',
lookBehind: 3,
local: false,
remote: 'origin',
});
```## LICENSE
MIT © Lukas Aichbauer