Sublime Forum

Commit hook not working on Windows

#1

Using Windows

I have a commit hook “commit-msg” which checks the branch and so on.

This works on GitExtensions. But not on Sublime Merge.

It starts with
#!/usr/bin/env bash

But that results in an error
/usr/bin/env 'bash': No such file or directory

Is the packaged “git” too reduced? :wink:

0 Likes

#2

you could install Git Bash for Windows and point Merge to use that

0 Likes

#3

You mean the “normal” git? I already have that installed.

Where can I find the parameter to set that? In “Preferences” I cannot find this…
Where is that “Default/Preferences.sublime-settings” ?

0 Likes

#4

Tracking this because I think that this will also solve my gpgsign issues with Sublime Merge on Windows… also using Git Bash… but not quite sure how I would configure that in settings.

T

0 Likes

#5

To have Sublime Merge use the system git on Windows, you can set the “git_binary” setting to “system”. That will look in the normal locations, if Sublime Merge can’t find it there, you’ll have to set it to the full path to git.exe. You can see the exact binary that Sublime Merge is using via the Help>Debug Information menu

0 Likes

#6

Hi,

looks better.

{
	"git_binary": "system"
}

Now the hook is executed. Still what is missing: color codes are not parsed and displayed.

[31m means red :slight_smile:

==> Feature Request

0 Likes