Skip to content

Instantly share code, notes, and snippets.

@tkalfigo
Last active February 1, 2017 14:26
Show Gist options
  • Save tkalfigo/8850946 to your computer and use it in GitHub Desktop.
Save tkalfigo/8850946 to your computer and use it in GitHub Desktop.
Script to run meld by default on git diff's (~/.git_meld_diff.js)
#!/usr/bin/env node
var exec = require('child_process').exec;
function cb(error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
}
}
exec('/usr/bin/meld ' + process.argv[3] + ' ' + process.argv[2] , cb);
Save this as `~/.git_meld_diff.js` and then run `$ git config --global diff.external ~/.git_meld_diff.js`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment