While working on CI setup and improvements for frontend projects, I found out that husky tool can be really annoying and it’s mostly setup as pre-push with all tools used in a project.

Husky usually runs a lot of stuff..
pretty-quick, eslint, stylelint, tsc, lint:i18n, test, detect-unorganized-imports
.. that I didn’t really need while editing .gitlab-ci.yml configuration.

To avoid this I was forced to add --no-verify flag to my git push command. That solved my issue while pushing through CLI.

But recently I’ve purchased and switched to Git-Tower which is a great tool and simplifies a lot of things. However I’ve found out that it’s not that easy as there is no access from GUI to add any flags to git.

After a while of digging I’ve found an answer on StackOverflow but it wasn’t straight enough, so I’ve found out other way.

Since [email protected] you’re able to use HUSKY_SKIP_HOOKS=1 with git command to skip hooks.

So, you can use it to skip husky hooks using CLI by adding HUSKY_SKIP_HOOKS=1 prefix to your command, for example: HUSKY_SKIP_HOOKS=1 git <command> ...

Now, to use it with Git-Tower environment integration, we have to create environment.plist file in ~/Library/Application Support/com.fournova.Tower3/ path with following value:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>HUSKY_SKIP_HOOKS</key>
        <integer>1</integer>
  </dict>
</plist>

and.. you’re done!

Every time you’re going to push something with Git-Tower, you will notice that husky is not running any hooks anymore.

Remember to enable husky hooks back again after you’re done.