UNPKG

is-git-status-clean

Version:

Check if the git working directory is clean

8 lines (5 loc) 165 B
const cp = require('child_process') module.exports = () => { const gitStatus = cp.execSync('git status --porcelain').toString().trim() return gitStatus === '' }