Skip to content

Instantly share code, notes, and snippets.

@bhargavpanth
Created February 14, 2017 13:44
Show Gist options
  • Save bhargavpanth/c286ff30e479f45947747d96c2c1ea7b to your computer and use it in GitHub Desktop.
Save bhargavpanth/c286ff30e479f45947747d96c2c1ea7b to your computer and use it in GitHub Desktop.
Working with Git - I find myself switching branches quite often. With constant changes, I end up running versions on other branches and edit on the current.
/*
Avoid all the confusion with this in your entry script
*/
var exec = require('child_process').exec;
var cmd = 'git branch | grep "*"'
exec(cmd, function(error, stdout, stderr) {
console.log("server source : " + stdout);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment