`post-merge` hook does not appear to run in UI
The problem
I have hooks set up in post-merge and post-checkout to update a workspace based on new files arriving.
It's good to know when it succeeds, but vital to know when it fails (basically an inconsistent workspace).
The dialog shows up when switching between branches (though only on failure, fair enough).
But it doesn't show up from pull or merge or update from master
As a trivial example, this hook does seem to run in the background, but there's no evidence of it failing to the end user:
#!/bin/sh
echo "Simulated error state"
echo "Bad data" > record.txt
exit 1Release version
Version 3.6.2 (x64)
Operating system
Windows 10
Steps to reproduce the behavior
- Be on a local branch at least one commit behind its remote tracking branch.
- add a hook that will exit nonzero to
.git/hooks/post-merge:
#!/bin/sh
echo "Hook running"
echo "Hook ran" > record.txt
exit 1Press the
Pull originbutton.Note that the script ran (
record.txthas been added to the workspace) but there was no UI warning of failure.To compare, copy the above hook to
.git/hooks/post-checkout, then switch branches.Note that on switch, the UI does appear.
Log files
2026-07-03.desktop.production.log
Screenshots
No response
Additional context
No response
Source: desktop/desktop