Git: Ctrl/Cmd+click on the Commit button to commit with --no-verify
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Summary
Allow `Ctrl+click` (`Cmd+click` on macOS) on the **Commit** button in the Source Control view to run the commit with `--no-verify`, i.e. as a modifier-click shortcut for the existing **Commit (No Verify)** action.
### Motivation
`Commit (No Verify)` already exists (gated behind `git.allowNoVerifyCommit`), but reaching it today means either:
- opening the dropdown next to the Commit button and picking the `... (No Verify)` variant, or
- going through the Command Palette, or
- binding a keyboard shortcut manually.
Skipping hooks is usually a spur-of-the-moment decision — a slow pre-commit hook while iterating, a WIP commit on a scratch branch, a hook that is broken for reasons unrelated to the change being committed. In those moments the mouse is already on the Commit button, and the dropdown adds several steps to something that is one flag on the command line (`git commit -n`).
A modifier-click is a good fit here: it keeps the default action unchanged and safe, costs nothing in UI surface, and matches the "modifier = alternate action" pattern VS Code already uses elsewhere (e.g. `Ctrl/Cmd+click` for Go to Definition, `Alt+click` variants on editor actions).
### Proposal
- `Ctrl+click` (`Cmd+click` on macOS) on the Commit button performs the **no-verify** variant of whatever the currently selected commit action is (`Commit`, `Commit & Push`, `Commit & Sync`, …), rather than only plain `Commit`.
- Only active when `git.allowNoVerifyCommit` is enabled, so the behavior stays opt-in and the setting remains the single switch that governs hook-skipping from the UI.
- The button tooltip mentions the modifier while the setting is enabled, so the shortcut is discoverable (e.g. `Commit (Ctrl+click to skip hooks)`).
- Ideally the same modifier applies to the Commit button in the SCM title bar and in the input box action, for consistency.
### Notes / open questions
- `Alt`/`Option` would be an equally reasonable modifier if `Ctrl+click` conflicts with existing bindings on some platforms — the important part is that a modifier-click exists at all. Making the modifier itself configurable would also work.
- Whether the confirmation prompt behavior should differ from the menu item is up to the maintainers; matching whatever `Commit (No Verify)` does today seems like the least surprising choice.
### Alternatives considered
- Binding `git.commitNoVerify` to a keyboard shortcut — works, but it is per-user setup and does not help when the interaction is already mouse-driven.
- Using the dropdown — works, but it is the extra-clicks path this request is about.
Contributor guide
Assessment
This issue has not been assessed yet.