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

current-git-branch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

current-git-branch

A tool to check if files are added in a git repository

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is current-git-branch?

The `current-git-branch` npm package is a simple utility that allows you to get the name of the current Git branch in a Node.js environment. It is useful for scripts and tools that need to be aware of the current branch context.

What are current-git-branch's main functionalities?

Get Current Git Branch

This feature allows you to retrieve the name of the current Git branch. The code sample demonstrates how to use the `current-git-branch` package to get the branch name and print it to the console.

const currentGitBranch = require('current-git-branch');
const branchName = currentGitBranch();
console.log(branchName);

Other packages similar to current-git-branch

Keywords

FAQs

Package last updated on 08 Apr 2017

Did you know?

Socket

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.

Install

Related posts

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