Skip to content

Instantly share code, notes, and snippets.

@gka
Last active September 1, 2015 20:08
Show Gist options
  • Save gka/27994430d4a9730ef064 to your computer and use it in GitHub Desktop.
Save gka/27994430d4a9730ef064 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var cmds = [];
if (process.argv.length < 3) {
console.log('You need to provide a commit message!');
process.exit(-1);
}
cmds.push('git add -A');
cmds.push('git add -u');
cmds.push('git commit -m "'+process.argv.slice(2).join(' ')+'"');
cmds.push('git pull');
cmds.push('git push');
require('child_process').exec(cmds.join(' && '));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment