https://github.com/afeiship/git-info
Get git infomation.
https://github.com/afeiship/git-info
branch git hash tag
Last synced: 4 months ago
JSON representation
Get git infomation.
- Host: GitHub
- URL: https://github.com/afeiship/git-info
- Owner: afeiship
- License: mit
- Created: 2017-06-26T02:55:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T06:02:20.000Z (about 2 years ago)
- Last Synced: 2025-12-12T22:43:45.902Z (7 months ago)
- Topics: branch, git, hash, tag
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# git-info
> Get git infomation.
## installation
```shell
npm i @jswork/git-info
```
## usage
```js
var branch = require('@jswork/git-info').branch;
//exec('git branch | grep \\\*')
//branch();
```
## get current brach
```bash
# git rev-parse --abbrev-ref HEAD
# git branch | grep '*'
```
## resources
+ https://github.com/pirelenito/git-revision-webpack-plugin