From b4bf4ef7e95f23724eabc9735f00e77af8f917c4 Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Sun, 22 Feb 2015 15:00:58 +0100 Subject: [PATCH] Added -n (skip hooks) flag to git commit When using some extra pre-commit hooks (like overcommit for example) which handle the validation, the script will silently fail and revert the last good commit. The reason of this is, that git commit won't proceed (due to hook fail), but script continues deployment. To avoid it, I added -n flag which skips all pre-commit hooks, thus allows commit to pass. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3f744b0..d64fd61 100644 --- a/index.js +++ b/index.js @@ -39,7 +39,7 @@ module.exports = function (options) { // execute('git add ' + folder, function () { - execute('git add ' + folder + ' && git commit -m "' + message + '"', function () { + execute('git add ' + folder + ' && git commit -n -m "' + message + '"', function () { gutil.log('Temporarily committing ' + chalk.magenta(folder)); execute('git ls-remote ' + remote + ' ' + branch, function (rmt) { if (rmt.length > 0) {