function getGitStatus() {
	try {
		const stdout = execSync( 'git status --porcelain', {
			stdio: [ 'pipe', 'pipe', 'ignore' ],
		} ).toString();
		return stdout.trim();
	} catch ( e ) {
		return '';
	}
}
Eject

The create-guten-block CLI ejects here.