Skip to content

Instantly share code, notes, and snippets.

@ebeloded
Created November 10, 2019 03:03
Show Gist options
  • Save ebeloded/fc9239a32ea48308d6f8b762171b40ec to your computer and use it in GitHub Desktop.
Save ebeloded/fc9239a32ea48308d6f8b762171b40ec to your computer and use it in GitHub Desktop.
Get git branch
const childProcessExec = require('child_process').exec;
const util = require('util');
const exec = util.promisify(childProcessExec);
checkCommitMessage();
async function checkCommitMessage(){
const branches = await exec('git branch');
console.log(branches.stdout);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment