Skip to content

Make git hooks Windows-compatible — hooks use #!/bin/bash so Git (Windows) silently skips them #140

Closed

Description

@darshan-n25

On Windows (Git for Windows), graphify's installed git hooks (post-commit / post-checkout) frequently do nothing after a commit because the hook files start with #!/bin/bash. Git for Windows executes hooks with its bundled sh.exe (Git\bin\sh.exe) which will try to use the shebang interpreter. If bash (or python3 via /usr/bin/env) is not available in PATH in that environment, the hook is skipped silently and the graph is never rebuilt.
i have changed the post-checkout and post-commit to work with windows.

post-checkout.txt
post-commit.txt

Activity

  1. added a commit that references this issue on Apr 9, 2026
  2. safishamsi commented on Apr 9, 2026

    @safishamsi
    Member

    Fixed in v0.3.21. Git hooks now start with #!/bin/sh instead of #!/bin/bash. The hook scripts only use POSIX sh syntax so this works on Git for Windows, macOS, and Linux without any behaviour change.

    Upgrade and reinstall the hooks:

    pip install --upgrade graphifyy
    graphify hook install
    
  3. added a commit that references this issue on Apr 23, 2026
  4. added a commit that references this issue on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions