Skip to content

Instantly share code, notes, and snippets.

@designfrontier
Created March 14, 2018 02:14
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 designfrontier/e903fe521f198be9176f389bf732fe8c to your computer and use it in GitHub Desktop.
Save designfrontier/e903fe521f198be9176f389bf732fe8c to your computer and use it in GitHub Desktop.
opens all of the files that have changed between where you are in git and HEAD on master in sublime. Handy
#!/usr/bin/env node
const cp = require('child_process');
cp.exec('git diff --name-only master HEAD', (err, out) => {
const files = [].concat('subl', '.', out.split('\n')).join(' ');
cp.exec(files, (e, o) => {
if (e) {
console.log(e, 0);
process.exit(1);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment