bahmutov / bahmutov/pre-git

Disable pre-commit hook for specific commit message

Open
#107 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
170
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I want to disable pre-commit hook (such as `git commit -n` option does) for specific commit messages. For example when developer wants to commit work in progress to the local repository only, it could be possible to use commit message with `WIP` prefix and pre-commit hook won't be fired.

To make it clear, WIP commits are bad in the remote repository and definitely they won't be merged here. This could be handy only for developers who have to use IDEs like WebStorm, where isn't built-in support for no-verify commit option (yet).

I would like to check commit message directly in my script, but I didn't found anything about how to obtain current message from checked commit. Is it any chance for this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the repository's pre-commit hook entry point and Git's commit-message hook behavior, including the `git commit -n` option mentioned in the issue. Done means WIP-prefixed local commits bypass the pre-commit hook while ordinary commit messages continue to trigger it, with the behavior verified against the existing hook setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.