git-branch-parent

0.1.2 • Public • Published

git-branch-parent

Get the parent (or source) branch of current branch from the git repository.

Install

Install with npm:

$ npm install --save git-branch-parent

Usage

const parent = require('git-branch-parent');

Optionally pass the cwd (current working directory) as the first argument.

Promise

parent('some/path')
  .then(name => console.log('Parent Branch:', name))
  .catch(console.error)

Sync

console.log('Parent Branch:', parent.sync())

Contributing

Contributors

License

Released under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i git-branch-parent

Weekly Downloads

6,836

Version

0.1.2

License

MIT

Unpacked Size

6.95 kB

Total Files

6

Last publish

Collaborators

  • roberto14