-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
The feature request
Currently, GitHub Desktop always runs Git hooks (such as pre-commit, commit-msg, and pre-push) when committing or pushing changes.
While this is the correct default for most workflows, there are situations where a user may want to temporarily bypass hooks for a specific repository — for example:
- Speeding up work in a repo with heavy lint/test hooks when prototyping.
- Committing experimental code without triggering validation steps.
- Working offline where hooks depend on network access.
At the moment, skipping hooks requires manually using the --no-verify flag in the command line for each commit or push, which defeats the purpose of using GitHub Desktop as a fully GUI-based workflow.
Proposed solution
Introduce a per-repository setting inside the Repository Settings → Git Config tab with a checkbox:
[ ] Skip Git hooks for commits and pushes in this repository
When enabled for the active repository:
- All
git commitcalls in GitHub Desktop will automatically include--no-verifyto skip pre-commit and commit-msg hooks. - All
git pushcalls will automatically include--no-verifyto skip pre-push hooks.
Benefits:
- Gives users fine-grained control without disabling hooks globally.
- Maintains the default safe behaviour (hooks enabled) for all repos unless explicitly changed.
- Reduces the need to drop into the CLI for bypassing hooks.
Additional context
Here’s a proposed UI mockup for the new setting. The checkbox would be placed in the Repository Settings → Git Config tab, directly below the Name and Email fields, since it relates to repository-specific Git behaviour.
When checked, GitHub Desktop would automatically add --no-verify to git commit and git push commands for this repository, allowing users to bypass local Git hooks without affecting other repositories.
