Skip to content

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

License

Notifications You must be signed in to change notification settings

thlorenz/resolve-git-branch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published