pre-commit hooks interfere with in-progress commit dev workflows
See original GitHub issueObserved behavior
When working locally, git is a powerful tool for storing in-progress work. It’s often desirable to commit changes that are not yet complete, even if there are bugs or formatting issues.
Pre-commit hooks impede a developer’s ability to use git as a way to save in-progress work.
It’s possible to do with git commit --no-verify
, but this is a hard command to remember and again impedes the flow of the developer’s work, especially because it’s not available from most git GUIs.
Expected behavior
Pre-commit should not get in the way of developer’s workflow.
The developer, and not the linter, ought to be in control of what is allowed to be committed in local, unshared working branches.
User-facing consequences
Certain kinds of dev workflows are impeded
Context
0.13.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Automating tasks and improving developer workflow with pre ...
What's pre-commit hook? Git has various checkpoints that we can hook into by providing an executable in .git/hooks/ with the name of the...
Read more >pre-commit
We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements....
Read more >How to Use Git Hooks in Your Development Workflow - Medium
We will execute a simple hook to validate that the code being pushed doesn't have any commit with 'WIP' in the commit message....
Read more >Using git hooks to improve your day-to-day workflow
The pre-commit hook is run first, before you even type in a commit message. It's used to inspect the snapshot that's about to...
Read more >Git Hooks | Atlassian Git Tutorial
Git Hooks are scripts that run automatically every time a particular event occurs in a Git repository. Learn what they do and how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If that works for you then that’s fine, but there are more effective strategies for saving in-progress work using git
You can install it as pre-push or whichever local hook of your preference.
https://pre-commit.com/#pre-commit-install
I don’t do that? I use stashing quite a lot, though.