Skip to content

This package provides an API to find the parent branch from the current git branch

License

Notifications You must be signed in to change notification settings

Roberto14/git-branch-parent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

This package provides an API to find the parent branch from the current git branch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •