├── git-go ├── package.json └── README.md /git-go: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var cmds = []; 3 | 4 | if (process.argv.length < 3) { 5 | console.log('Please provide a commit message!'); 6 | process.exit(-1); 7 | } 8 | 9 | cmds.push('git add -A'); 10 | cmds.push('git commit -m "'+process.argv.slice(2).join(' ')+'"'); 11 | cmds.push('git pull'); 12 | cmds.push('git push'); 13 | 14 | require('child_process').execSync(cmds.join(' && '), { stdio: 'inherit' }) 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "git-go", 3 | "version": "1.0.3", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "bin": { 10 | "git-go": "./git-go" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/gka/git-go.git" 15 | }, 16 | "author": "", 17 | "license": "ISC", 18 | "bugs": { 19 | "url": "https://github.com/gka/git-go/issues" 20 | }, 21 | "homepage": "https://github.com/gka/git-go#readme" 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # git-go 2 | 3 | 4 | 5 | *git-go* is a short-hand command for doing 6 | 7 | ``` 8 | git add -A 9 | git add -u 10 | git commit -m "SOME MESSAGE" 11 | git pull 12 | git push 13 | ``` 14 | 15 | It is a dangerous practice, but it saves a lot of time. Also it encourages [committing early and often](http://www.databasically.com/2011/03/14/git-commit-early-commit-often/). 16 | 17 | ### Usage 18 | 19 | It's really just `git-go COMMITMSG`. Note that you don't have to put quotes around the commit message. 20 | 21 | ``` 22 | git-go your commit message goes here 23 | ``` 24 | 25 | If you intend to use quotes, you need to escape them using `\`. 26 | 27 | ``` 28 | git-go I\'m done coding 29 | ``` 30 | 31 | ### Installation 32 | 33 | ``` 34 | npm install -g git-go 35 | ``` 36 | 37 | ### Credit 38 | 39 | This is just a nodejs port of @jashkenas' git-go Ruby script. 40 | --------------------------------------------------------------------------------