Obtenga el último Git Commit Sha-1 en un repositorio JS
require('child_process').exec('git rev-parse HEAD', function(err, stdout) {
console.log('Last commit hash on this branch is:', stdout);
});
Cheerful Chimpanzee