开发者社区> 镜像站> NPM> git-hash
git-hash
> Just show the hash of a branch, tag, etc.
Last updated 3 years ago by blakek .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install git-hash 
SYNC missed versions from official npm registry.

git-hash

Just show the hash of a branch, tag, etc.

If you need to know the hash of some git object, just run git-hash. All this does is runs git rev-parse. However, this makes more sense to me, and hash is easier to remember than rev-parse.

Usage

Show the (short) hash of the current branch:

git hash

Show the long hash of the current branch:

git hash -l

# short for: git hash --long

Show the hash of a branch, tag, etc.:

# show the hash of master
git hash master

# show the hash of a tag
git hash v1.0.4

# show the entire hash of feature/fun-stuff
git hash -l feature/fun-stuff

Install

Option 1: use yarn or npm

If using npm:

npm i -g git-hash

If using Yarn:

yarn global add git-hash

Option 2: manual installation

  1. Either clone this repo or download the zip file
  2. Add git-hash from this project to your $PATH

License

MIT

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

3 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 4
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None