Skip to content

Instantly share code, notes, and snippets.

@lisacharlotterost
Forked from gka/git-go
Last active June 20, 2016 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lisacharlotterost/d5cd096bf01364897a0ad83fc316b438 to your computer and use it in GitHub Desktop.
Save lisacharlotterost/d5cd096bf01364897a0ad83fc316b438 to your computer and use it in GitHub Desktop.
gita
#!/usr/bin/env node
var cmds = [];
if (process.argv.length < 3) {
console.log('You just totally forgot the commit message.');
process.exit(-1);
}
cmds.push('git add -A');
cmds.push('git commit -m "'+process.argv.slice(2).join(' ')+'"');
cmds.push('git pull');
cmds.push('git push');
require('child_process').exec(cmds.join(' && '), function(err, stdout, stderr) {
if (err) console.error(err);
if (stdout) console.log(stdout);
if (stderr) console.error(stderr);
});
@lisacharlotterost
Copy link
Author

lisacharlotterost commented Jun 20, 2016

install with curl https://gist.githubusercontent.com/lisacharlotterost/d5cd096bf01364897a0ad83fc316b438/raw/ef9a082c523df9d66888d9ef6b139eaa985b91cc/gita > /usr/local/bin/gita && chmod +x /usr/local/bin/gita

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment