UNPKG

gg-beta

Version:

GitGud Beta. This package is deprecated and no longer supported. Please use the main gitgud package instead.

22 lines (17 loc) 412 B
const { execSync } = require("child_process"); const { stat } = require("fs"); const gitBranchCall = () => { let currentBranch = execSync( //shows current branch 'git branch --show-current', (error, stdout, stderr) => { if (error) { console.error(`exec error: ${error}`); return; } return stdout; } ).toString(); return currentBranch } module.exports = gitBranchCall;