Skip to content

Add per-repository option to skip Git hooks for commits and pushes #20887

@Katyaraa1

Description

@Katyaraa1

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 commit calls in GitHub Desktop will automatically include --no-verify to skip pre-commit and commit-msg hooks.
  • All git push calls will automatically include --no-verify to 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.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions