Created
November 10, 2019 03:03
-
-
Save ebeloded/fc9239a32ea48308d6f8b762171b40ec to your computer and use it in GitHub Desktop.
Get git branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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