resolve-git-branch

0.1.1 • Public • Published

resolve-git-branch build status

Resolves the currently checked out branch of the git repository in the current directory.

var branch = require('resolve-git-branch');

branch(function (err, branch) {
  if (err) return console.error(err);
  console.log(branch); // => master
})

Installation

npm install resolve-git-branch

API

resolveGitBranch(cb)

/**
 * Runs git command to resolve currently checked out branch and calls back with branch name.
 * 
 * @name resolveGitBranch
 * @function
 * @param {Function} cb function (err, branch) {}
 */

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i resolve-git-branch

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • thlorenz