Skip to content

Add Option To Skip Pre-Commit Hooks (--no-verify) #11626

Closed

Description

@digitalmaster

Describe the feature or problem you’d like to solve

I love this app so much that I feel a sense of discomfort anytime I need to switch to my terminal to do something. In that spirit, one of the actions that still requires switching to the terminal is performing a commit that I know will fail the pre-commit hooks (ex: linting).

Proposed solution

Proposal I: Add Option to skip webhooks in commit form
This could be a checkbox next to the "Add Co-Authors" Icon.
image

Proposal II: Add a "Commit Anyway" button to failed pre-commit hook modal
image

How will it benefit Desktop and its users?
No need to switch to perform checkpoint commits where we expect our hooks to fail.

Activity

  1. steveward commented on Feb 19, 2021

    @steveward
    Contributor

    Thanks @digitalmaster! We've discussed the option of providing a pre-commit "escape hatch" in #9351. I'm going to add this feedback to that thread. Thanks for using GitHub Desktop!

  2. steveward commented on Jan 19, 2022

    @steveward
    Contributor

    @kazunetakeda25 this feature has not been implemented yet.

  3. keoshi commented on Jan 21, 2022

    @keoshi

    Also looking forward to have this capability in the desktop app.

  4. qanut commented on Feb 1, 2022

    @qanut

    Would definitely be a quality of life improvement to get this feature added. Hope it can be added soon.

  5. AkqaMartin commented on Mar 9, 2022

    @AkqaMartin

    Any news on this? I would love to see this feature implemented

  6. Hantuch commented on Apr 13, 2022

    @Hantuch

    Would love to see this! it can be annoying sometimes

  7. Ghurir commented on May 4, 2022

    @Ghurir

    For people still struggling with this, you can use the following method:

    1. select all the files you want to commit
    2. press the commit button, and wait for it to show the error popup.
    3. On the top window select "Repository>Open in command prompt"
    4. type "git status" to verify that the files you selected have been added to the staging area
      you should see something like:
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            modified:   simulation_parameters/microbe_stage/compounds.json
            modified:   src/engine/Settings.cs
            modified:   src/microbe_stage/Compound.cs
            modified:   src/microbe_stage/CompoundCloudPlane.cs
            modified:   src/microbe_stage/CompoundCloudPlane.tscn
            modified:   src/microbe_stage/CompoundCloudSystem.cs
    
    1. If all files are present use "git commit --no-verify"
  8. 1pete commented on Oct 12, 2022

    @1pete
    Contributor
  9. mosherc commented on Mar 6, 2023

    @mosherc

    For people still struggling with this, you can use the following method:

    1. select all the files you want to commit
    2. press the commit button, and wait for it to show the error popup.
    3. On the top window select "Repository>Open in command prompt"
    4. type "git status" to verify that the files you selected have been added to the staging area
      you should see something like:
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            modified:   simulation_parameters/microbe_stage/compounds.json
            modified:   src/engine/Settings.cs
            modified:   src/microbe_stage/Compound.cs
            modified:   src/microbe_stage/CompoundCloudPlane.cs
            modified:   src/microbe_stage/CompoundCloudPlane.tscn
            modified:   src/microbe_stage/CompoundCloudSystem.cs
    
    1. If all files are present use "git commit --no-verify"

    That's not really any easier than committing via command line in the first place. It would be nice to have this in the UI so we don't have to go to the command line at all.

  10. karpur commented on May 20, 2023

    @karpur

    --no-verify works, but in my case, I didn't want to put the parameter all the time on the terminal. So I opted for something a little more aggressive.

    If you want to disable git hooks globally, you could try running this:

    git config --global core.hooksPath /dev/null
    But, if you want to leave it as it was before, just run the following command in your terminal:

    git config --global --unset core.hooksPath
    If you do not want it to be global, just remove the argument: --global

  11. alimertcakar commented on Oct 23, 2023

    @alimertcakar

    It would be nice to still have pre-commit hooks in terminal and have --no-verify in github desktop for things like squashing...

    Suggested solutions are worse IMO.
    Actually commenting and uncommenting husky precommit files is easier. You could bind that to an alias like: "$disable-precommit hooks" "$enable-precommit-hooks". Also you have to git reset them so you don't commit them, and stash them when you are about to commit/squash etc.

  12. rprhernandez commented on Jul 11, 2024

    @rprhernandez

    any news if this will be implemented in the near future..?

  13. marceloapd commented on Oct 9, 2024

    @marceloapd

    up

  14. dragidavid commented on Feb 26, 2025

    @dragidavid

    up up ☝

  15. JohannSig commented on Apr 7, 2025

    @JohannSig

    Up 👍🏻

  16. sushil-b commented on Apr 21, 2025

    @sushil-b

    Waiting for this 👀

  17. maurei commented on Apr 28, 2025

    @maurei

    Upping this too :-)

  18. rignaneseleo commented on May 26, 2025

    @rignaneseleo

    upppp

  19. cloydlau commented on Jun 18, 2025

    @cloydlau

    upppp

  20. kaytladi22 commented on Jun 27, 2025

    @kaytladi22

    UUUUUUUUppp

  21. JDS-DC commented on Jul 4, 2025

    @JDS-DC

    Why is this marked as closed? It's still a missing feature. It's essential!

  22. yatsenkoleg-spiralsoft commented on Oct 27, 2025

    @yatsenkoleg-spiralsoft

    up

  23. anastasiia-matiushenko commented on Jan 23, 2026

    @anastasiia-matiushenko

    hey! any chance we actually have this commit anyway in Github Desktop. will be super useful!!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions