gulp-rename-git

Renames a file and passes a git hash to use on the path

npm install gulp-rename-git
var gulp = require('gulp'),
    gitRename = require('gulp-rename-git');
 
gulp.task('default', function() {
  return gulp.src('./src/*.js')
 
    // Look here
    .pipe(gitRename(function(path, gitHash) {
      path.dirname = '/' + gitHash + '/js/';
    }))
 
    .pipe(gulp.dest('./dist'));
});