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
Add Option To Skip Pre-Commit Hooks (--no-verify) #11626
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.
Proposal II: Add a "Commit Anyway" button to failed pre-commit hook modal
How will it benefit Desktop and its users?
No need to switch to perform checkpoint commits where we expect our hooks to fail.
Reacted by Jacob Smith, Dan Wilt, Muha Ajjan, Patrick Mowrer, Josh Cawthorne, nimrossum, Martin Lundsgaard, Filipe Varela, Mohammad Kermani, Tiago Freitas and 37 more
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!
Reacted by Jose Browne, IbanCurdu, Matt Sears, Filipe Varela, Josh Cawthorne, Jordan Burgess, owenbrownzc, Serhan Guney, Simon Scheurer, Syahril and 3 more
For people still struggling with this, you can use the following method:
select all the files you want to commit
press the commit button, and wait for it to show the error popup.
On the top window select "Repository>Open in command prompt"
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
If all files are present use "git commit --no-verify"
Reacted by Enzo Volkmann, Oleksii Burda, Aaron Ware, MalteEbner, Jakob Murko, Runar Ovesen Hjerpbakk, Dev Chakraborty, Tony Hirst, Lee James, mdornseif and 5 more
For people still struggling with this, you can use the following method:
select all the files you want to commit
press the commit button, and wait for it to show the error popup.
On the top window select "Repository>Open in command prompt"
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
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.
Reacted by Jose Browne, Matt, Ali Mert Çakar, Jack, Erik Torsner, Rutgernens and Pavel Mickevic
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.
Reacted by Sebastian Di Luzio, Michael Lambert, Lukas Figura and Bryan Field
Activity
steveward commentedon Feb 19, 2021
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!
steveward commentedon Jan 19, 2022
@kazunetakeda25 this feature has not been implemented yet.
keoshi commentedon Jan 21, 2022
Also looking forward to have this capability in the desktop app.
qanut commentedon Feb 1, 2022
Would definitely be a quality of life improvement to get this feature added. Hope it can be added soon.
AkqaMartin commentedon Mar 9, 2022
Any news on this? I would love to see this feature implemented
Hantuch commentedon Apr 13, 2022
Would love to see this! it can be annoying sometimes
Ghurir commentedon May 4, 2022
For people still struggling with this, you can use the following method:
you should see something like:
1pete commentedon Oct 12, 2022
i use this, works for me :)
source: https://stackoverflow.com/questions/7230820/skip-git-commit-hooks
mosherc commentedon Mar 6, 2023
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.
karpur commentedon May 20, 2023
--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
alimertcakar commentedon Oct 23, 2023
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.
rprhernandez commentedon Jul 11, 2024
any news if this will be implemented in the near future..?
marceloapd commentedon Oct 9, 2024
up
dragidavid commentedon Feb 26, 2025
up up ☝
JohannSig commentedon Apr 7, 2025
Up 👍🏻
sushil-b commentedon Apr 21, 2025
Waiting for this 👀
maurei commentedon Apr 28, 2025
Upping this too :-)
rignaneseleo commentedon May 26, 2025
upppp
cloydlau commentedon Jun 18, 2025
upppp
kaytladi22 commentedon Jun 27, 2025
UUUUUUUUppp
JDS-DC commentedon Jul 4, 2025
Why is this marked as closed? It's still a missing feature. It's essential!
yatsenkoleg-spiralsoft commentedon Oct 27, 2025
up
anastasiia-matiushenko commentedon Jan 23, 2026
hey! any chance we actually have this
commit anywayin Github Desktop. will be super useful!!