Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-repo-info

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-repo-info - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "git-repo-info",
"version": "1.0.0",
"version": "1.0.1",
"description": "Retrieve current sha and branch name from a git repo.",

@@ -5,0 +5,0 @@ "main": "index.js",

## git-repo-info
Retrieves repo information.
Retrieves repo information without relying on the `git` command.
### Usage
```javascript
var getRepoInfo = require('git-repo-info');
var info = getRepoInfo();
info.branch //=> will be the current branch
info.sha //=> will be the current sha
info.abbreviatedSha //=> will be the first 10 chars of the current sha
```
When called without any arguments, `git-repo-info` will automatically lookup upwards
into parent directories to find the first match with a `.git` folder.
If passed an argument, it will be assumed to be the path to the repo's `.git` folder
to inspect.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc