Skip to content

Instantly share code, notes, and snippets.

@sjwilliams
Forked from gka/git-go.js
Last active September 1, 2015 20:08
Show Gist options
  • Save sjwilliams/f876354010fdaa7ef582 to your computer and use it in GitHub Desktop.
Save sjwilliams/f876354010fdaa7ef582 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