Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get the latest git commit SHA-1 in a repository js

require('child_process').exec('git rev-parse HEAD', function(err, stdout) {
    console.log('Last commit hash on this branch is:', stdout);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #latest #git #commit #repository #js
ADD COMMENT
Topic
Name
8+5 =