is-merge-commit

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

Usage no npm install needed!

<script type="module">
  import isMergeCommit from 'https://cdn.skypack.dev/is-merge-commit';
</script>

README

is-merge-commit

Build Status Build status Coverage Status

Get synchronously the current branch name

Installation

$ npm i is-merge-commit --save

or

$ yarn add is-merge-commit

Usage

isMergeCommit(commit[, options])

Parameters:

  • commit <String>: The git commit identifier
  • options <Object> (optional)

Options:

  • cwd <String>: Current working directory for the git execution

Returns:

  • Boolean: Wether it is a merge commit or not
const isMergeCommit = require('is-merge-commit');

isMergeCommit('8bc8ea6'); // true | false
isMergeCommit('8bc8ea6', { cwd: 'any/git/repo' }); // true | false

LICENSE

MIT © Jan Peer Stöcklmair