Skip to content

Show console output in popup when pre-commit hooks fired #15286

Closed

Description

@pumano

The feature request

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

Pinned by niik

Activity

  1. steveward commented on Sep 15, 2022

    @steveward
    Contributor

    Thanks for the issue @pumano, dropping #9351 in here to reference as well since that's related to pre-commit hook failure context.

  2. steveward commented on Dec 15, 2022

    @steveward
    Contributor

    Requested in #14323:

    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.

  3. KrystilizeNevaDies commented on Feb 8, 2023

    @KrystilizeNevaDies

    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.

  4. shamilovtim commented on Mar 9, 2023

    @shamilovtim

    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.

  5. steveward commented on Mar 24, 2023

    @steveward
    Contributor

    From #16369:

    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.

  6. NitishGadangi commented on Jun 27, 2023

    @NitishGadangi

    @steveward It's been a while since this issue opened, is there any scope for bringing this feature soon?
    Would be really helpful.

  7. ekimbernow commented on Oct 11, 2023

    @ekimbernow

    +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.

  8. choxnox commented on Apr 25, 2024

    @choxnox

    Any updates on this issue?

  9. ahmad-punch commented on May 14, 2024

    @ahmad-punch

    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.

  10. added
    not-planned
    on Jul 8, 2024
  11. steveward commented on Jul 22, 2024

    @steveward
    Contributor

    Requested in #19001.

  12. niik commented on Jan 14, 2026

    @niik
    Member

    Yesterday we shipped GitHub Desktop 3.5.5-beta1 to our beta channel with improved support for hooks related to committing.

    Screenshot showing the GitHub Desktop commit form as a pre-commit hook is running

    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.

    Screenshot showing the hook settings dialog
  13. ekimbernow commented on Jan 14, 2026

    @ekimbernow

    Seems to work just as I would like:

    Image

    It would be nice if the window could be resized to accommodate the width of the messages, but what's there is good enough.

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

    enhancementnot-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions