Skip to content

Hooks

You can use the Hooks tab to view and manage Git hooks, scripts that run automatically at specific points in the Git workflow.

To open the Hooks tab, click Git > Hooks. The tab belongs to the repository it was opened from, and opening it again brings that tab forward rather than making a second one.

Every Git tool tab carries a Git tools control beside its title. Use it to move between Git Summary, Remotes, Submodules, Subtrees, Git LFS, Sparse Checkout, Repository Config, and Hooks. The menu marks the tool you are on, and choosing a tool opens it for this repository, or brings its tab forward when it is already open. Each tool is its own tab, so two projects can each have their own.

Each installed hook row shows the following information.

  • Hook: The hook name and file size. A badge identifies the hook manager: Husky, pre-commit, or Lefthook. The manager can replace the script, so make changes in its configuration.
  • Status: Shows the hook’s state. See Hook status.
  • Actions: Disable or enable the hook.

Click a hook’s row or arrow to show the content and path of the hook file. Click it again to hide them. Click the path to open the file in the File editor. If the file is not a text file, the row shows a message instead of its content.

To stop a hook from running, click Disable, then confirm. Zide adds .disabled to the file name. To enable the hook again, click Enable. Zide removes .disabled from the file name. If the hook changed after the list loaded, Zide does not rename the file and refreshes the list. Check the hook, then try again.

Click the hooks directory to show the folder in the Files activity. If core.hooksPath is set, it specifies the hooks directory. The label after the directory shows the configuration that sets it: worktree, repo, global, or system. By default, a linked worktree shares hooks with the main repository.

Hooks not installed in the repository are listed at the bottom of the Hooks tab.

The Hooks tab updates when a hook file changes, or when core.hooksPath changes.

Hook status

  • Active: Git runs the hook.
  • Disabled: Git does not run the hook.
  • Not executable: The file does not have execute permission, so Git skips it. This status occurs on macOS and Linux.
  • Conflict: Both <name> and <name>.disabled exist. Git uses <name>. Before you enable or disable the hook, remove or rename one of the files. Expand the row to see both file paths.
  • Invalid: The hook is not a readable file. For example, it can be a folder or a broken link. Git cannot run it.

Review a blocked operation

Zide follows your repository’s Git hooks and commit signing settings for commits, amends, merges, reverts, cherry-picks, and rebases.

When a Git hook blocks an operation or a push, click View error in the notification. Zide opens the Hooks tab, marks the hook’s row, and shows its output under Last run failed.

If Git cannot sign a commit, Zide shows Commit signing failed. Git’s output is in the App Console.

If a hook or signing failure prevents a commit during a merge, revert, cherry-pick, or rebase, the operation stays in progress. Fix the cause, then click Commit or Continue in the conflict banner. To cancel the operation, click its label in the banner. Click Abort merge…, Abort rebase…, Abort cherry-pick…, or Abort revert…, then confirm.

If a hook stops a rebase before it starts, fix the cause and start the rebase again.

The notification and Last run failed panel close when the blocked action succeeds or you abort the operation. Click Dismiss to close both yourself. A newer hook failure replaces the notification and panel details.

To skip the pre-commit and commit-msg checks for a commit, expand Advanced Options in Staging and select Skip hooks. Other hooks can still run.