[GH-ISSUE #606] Fork on Windows: install-hook not working #193

Closed
opened 2026-03-02 04:12:46 +03:00 by kerem · 3 comments
Owner

Originally created by @martinsafsten-codescene on GitHub (Feb 27, 2026).
Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/606

System

Git AI version: 1.1.6
Fork version: 2.16.1.0
OS: Windows 11

Description

When I run git-ai install-hooks, I see the message about preferences being set for Fork. I read in your source code that it should swap the GitInstancePath setting to your git.exe shim. The installer does its job, however Fork seems to reject the config, and resets to its default settings at launch.

When I do it manually through their UI, when selecting the git shim, I get the following error

Cannot find git instance at: 'C:\Users\marti\.git-ai\bin\git.exe'. Missing bash.exe

Making a copy of bash.exe and putting it next to your shim fixes the error, and I can select the shim as a custom git instance.

But even after that, committing using the Fork UI seems to strip the notes, and the AI metadata is lost.

Originally created by @martinsafsten-codescene on GitHub (Feb 27, 2026). Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/606 ### System Git AI version: 1.1.6 Fork version: 2.16.1.0 OS: Windows 11 ### Description When I run `git-ai install-hooks`, I see the message about preferences being set for Fork. I read in your source code that it should swap the GitInstancePath setting to your git.exe shim. The installer does its job, however Fork seems to reject the config, and resets to its default settings at launch. When I do it manually through their UI, when selecting the git shim, I get the following error ``` Cannot find git instance at: 'C:\Users\marti\.git-ai\bin\git.exe'. Missing bash.exe ``` Making a copy of bash.exe and putting it next to your shim fixes the error, and I can select the shim as a custom git instance. But even after that, committing using the Fork UI seems to strip the notes, and the AI metadata is lost.
kerem closed this issue 2026-03-02 04:12:46 +03:00
Author
Owner

@martinsafsten-codescene commented on GitHub (Feb 27, 2026):

I have created a ticket on their tracker aswell: https://github.com/fork-dev/TrackerWin/issues/2720

<!-- gh-comment-id:3974540462 --> @martinsafsten-codescene commented on GitHub (Feb 27, 2026): I have created a ticket on their tracker aswell: https://github.com/fork-dev/TrackerWin/issues/2720
Author
Owner

@svarlamov commented on GitHub (Feb 27, 2026):

Hey @martinsafsten-codescene I think I know the root cause of this regression. We recently migrated to using absolute paths in place of just git-ai.exe and git bash doesn't like the Windows-style paths. Very similar to what happened with Claude Code's recent change to use the git bash terminal for hook execution #596

Will work to get a patch out in the next rel tn/tmrw

<!-- gh-comment-id:3975093933 --> @svarlamov commented on GitHub (Feb 27, 2026): Hey @martinsafsten-codescene I think I know the root cause of this regression. We recently migrated to using absolute paths in place of just `git-ai.exe` and git bash doesn't like the Windows-style paths. Very similar to what happened with Claude Code's recent change to use the git bash terminal for hook execution #596 Will work to get a patch out in the next rel tn/tmrw
Author
Owner

@martinsafsten-codescene commented on GitHub (Feb 27, 2026):

Thanks for the quick reply! Looking forward to it!

<!-- gh-comment-id:3975588743 --> @martinsafsten-codescene commented on GitHub (Feb 27, 2026): Thanks for the quick reply! Looking forward to it!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#193
No description provided.