import { exec } from 'child_process'; export const getCurrentBranch = (): Promise => new Promise((resolve, reject) => { return exec('git branch --show-current', (err, stdout, stderr) => { if (err) reject(err); else resolve(stdout.trim()); }); });