
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
commit-hash
Advanced tools
Obtain a repository's commit hash from a branch name, tag, or reference.
npm install commit-hash
var commitHash = require('commit-hash');
// looking up a short commit hash, in a project in the current directory
commitHash('21f6b', function(err, hash) {
console.log(hash); // => '21f6ba4e644e77d6e20eaa5156a928b6d75fdf76'
});
// looking up a tag with modifiers, in a project somewhere else
commitHash('v0.1.0^^', {dir: '/home/dgo/repos/commit-hash'}, function(err, hash) {
console.log(hash); // => '285d19c23a56662bab97c75b4bfc80a175dfdae2'
});
// looking up a remote branch, after fetching from all remotes
// to ensure the local repo has updated references
commitHash('origin/tests-unused-branch', {
dir: '/home/dgo/repos/commit-hash',
fetch: true
}, function(err, hash) {
console.log(hash); // => '3f07195438a6a846554ed4b8cd7b3223a8c5e91e'
});
MIT license - http://www.opensource.org/licenses/mit-license.php
FAQs
Get commit hash from a branch name, tag, or reference
The npm package commit-hash receives a total of 3 weekly downloads. As such, commit-hash popularity was classified as not popular.
We found that commit-hash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.