Skip to content

core.hooksPath not respected for custom Git hooks (e.g. .githooks folder) #8090

@indaco

Description

@indaco

Version

0.14.16

Operating System

macOS

Distribution Method

dmg (Mac OS - Apple Silicon)

Describe the issue

Originally discussed in this comment — opening a new issue as suggested in the reply.

Hi all,

First of all, thanks for the amazing work on GitButler — it’s truly changed the way I work with Git, giving me much more flexibility and control.

One thing I’m struggling with is getting Git hooks to run properly. I always enable the “Run commit hooks” toggle in my project settings, since I always rely on hooks in my workflow.

I usually store my hook scripts in a .githooks folder and set it with:

git config core.hooksPath .githooks

However, the hooks are never executed (yes, they are set as executables: chmod +x .githooks/*). I also tried using the default git/hooks directory, but unfortunately, the result is the same — they still don’t run. Specifically, I’m trying to use pre-commit and pre-push hooks.

I’m not sure if I’m doing something wrong or if there’s a limitation I’m missing. I’d really love to get this working, as commit hooks are a critical part of my development flow.

Any help or insights would be greatly appreciated — and again, thanks for all your great work on GitButler!

How to reproduce (Optional)

No response

Expected behavior (Optional)

When I enable the “Run commit hooks” toggle and set core.hooksPath to a custom directory (e.g., .githooks), GitButler should run the hook scripts (e.g., pre-commit, pre-push) located in that directory — just like standard Git behavior when run via CLI.

Relevant log output (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions