git-tower

Git-Tower for Mac - how can i use --no-verify flag in each commit?


We are using husky pre-commit hooks and i cannot commit with tower ever since. I use the CLI for my commits now but i want to be able to use Git Tower as well.

Any users out there know a quick fix? Thank you.


Solution

  • To disable hooks introduced by husky in frontend project, you can:

    Create environment.plist file in ~/Library/Application Support/com.fournova.Tower3/ with following content:

    <?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>
    

    That's it. Next time if you try to push something, hooks introduced by husky will be disabled.

    Note: you can also use this flag with CLI like this: HUSKY_SKIP_HOOKS=1 git <command> ...

    I've also wrote a blog post about it.