You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show console output in popup when pre-commit hooks fired #15286
Show console output in popup when pre-commit hooks fired, because if that process is long running - it's confuse from UX point of view. First idea - github desktop freezes
Proposed solution
show hooks console output inside modal as it show final result of failed pre-commit.
Additional context
No response
Reacted by Ruggero Tomaselli, Edward Kim, Sintel, Tim Shamilov, Donkie, Tucker Bradford, Jared-Napoli, Alex Tan, moti, David Weinberg and 9 more
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.
The feature request
I am currently checking type issues, test coverage and other trivial things in the pre-push hook. This is because these issues are identifiable in the local machine and once fixed provides high assurance that the build will be stable.
Proposed solution
Step 1: Check if any hooks are configured for the given repo. (The files under .git/hooks/ without .sample extension)
Step 2: If present, show a console window in GitHub Desktop (Please refer the screen shot - Inline with Commit message but in No changes window - Bottom section)
Step 3: The output of the respective hook should be dumped here on respective action.
I would also find this very useful.
I wanted to add that interaction with any popup console for hooks that read cli input would also be much appreciated <3.
Yeah to back this up. When working with git in a substantial project with CI, CD and CLI scripts there are many useful messages echoed to the terminal from various git hooks. Without seeing these messages Github Desktop lacks context and becomes a hamstrung client. displaying the echoed messages somewhere is critical and should be a first class piece of any git GUI.
Reacted by Tyreece Rozycki, Tucker Bradford, NenadRadovanovIzon and Maxence Gama
When cherry-picking a commit into a branch with conflicts that fails Git hooks (in my case, husky), GitHub Desktop switches back to the prior branch with no changes (or errors).
I have uploaded a video for additional context. If you watch this very closely and very carefully, you can see for a split second there is an error modal that dismisses immediately.
+1 for this issue. We are implementing pre-commit hooks and if many files are changed (which sometimes happens), the "Committing to ..." indicator spins for a long time.
Our hooks output messages for files that fail the check and can also provide interactive status (i.e., progress bar) when the number of files is greater than say 100.
When I push with github desktop while running a pre-push hook to check if build succeeds or not
It seems that the github desktop is stuck. (because of no visual indication)
Also I get no output or logs in VSCODE in the git output.
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.
Activity
steveward commentedon Sep 15, 2022
Thanks for the issue @pumano, dropping #9351 in here to reference as well since that's related to pre-commit hook failure context.
steveward commentedon Dec 15, 2022
Requested in #14323:
KrystilizeNevaDies commentedon Feb 8, 2023
I would also find this very useful.
I wanted to add that interaction with any popup console for hooks that read cli input would also be much appreciated <3.
shamilovtim commentedon Mar 9, 2023
Yeah to back this up. When working with git in a substantial project with CI, CD and CLI scripts there are many useful messages echoed to the terminal from various git hooks. Without seeing these messages Github Desktop lacks context and becomes a hamstrung client. displaying the echoed messages somewhere is critical and should be a first class piece of any git GUI.
steveward commentedon Mar 24, 2023
From #16369:
NitishGadangi commentedon Jun 27, 2023
@steveward It's been a while since this issue opened, is there any scope for bringing this feature soon?
Would be really helpful.
ekimbernow commentedon Oct 11, 2023
+1 for this issue. We are implementing pre-commit hooks and if many files are changed (which sometimes happens), the "Committing to ..." indicator spins for a long time.
Our hooks output messages for files that fail the check and can also provide interactive status (i.e., progress bar) when the number of files is greater than say 100.
choxnox commentedon Apr 25, 2024
Any updates on this issue?
ahmad-punch commentedon May 14, 2024
any update here?
When I push with github desktop while running a pre-push hook to check if build succeeds or not
It seems that the github desktop is stuck. (because of no visual indication)
Also I get no output or logs in VSCODE in the git output.
steveward commentedon Jul 22, 2024
Requested in #19001.
niik commentedon Jan 14, 2026
Yesterday we shipped GitHub Desktop 3.5.5-beta1 to our beta channel with improved support for hooks related to committing.
The support is experimental and currently limited to our beta channel. While we believe that this release resolved this issue we're looking for real-world feedback so if you have the ability we'd appreciate it if you could download our beta channel and give it a spin. Ensure the experimental hooks support it's enabled by going to Settings -> Git -> Hooks and making sure the "Load Git hook environment variables from shell" is ticked.
ekimbernow commentedon Jan 14, 2026
Seems to work just as I would like:
It would be nice if the window could be resized to accommodate the width of the messages, but what's there is good enough.