Skip to content

Bypassing Git Hooks

Erica Pisani
Erica Pisani
1 min read

Git hooks are a useful mechanism for performing code quality checks in your local development environment before committing that code or pushing it up to a remote branch. A common quality check that a git hook can perform is running the project’s code linter, such as eslint.

While it can be good practice to have these hooks configured within a project, at times they can be annoying when you’re trying to share a work-in-progress branch with a team mate by pushing the changes to a remote branch. In such situations, they can feel like they’re an impediment towards getting meaningful work done.

A workaround to this (until you’re able to come back and address those issues), is the --no-verify flag, which bypasses these hooks.

It’s worth noting that because the use of --no-verify is not able to be suppressed entirely (as far as I’m aware), it’s good practice to have the same checks that are performed by the git hooks also be performed as part of a continuous integration/continous delivery pipeline. Doing so will guarantee that code violating quality checks run by configured git hooks are always (eventually) addressed.


📫
Enjoy this post? Subscribe to be notified when I publish new content!
tips-and-tricks

Comments


Related Posts

Members Public

How to install a Nerd Font on Warp

I started using Vim as my IDE of choice recently, and one of the things I wanted early on was a more visually appealing icon and font set. I kept reading about Nerd Fonts so I decided to try installing one, but the instructions for doing so were both clear

Members Public

How to change the version of an npm package associated with a specific tag

If publishing experimental npm packages is a somewhat regular part of your development workflow, you've likely experienced some nerves around publishing that package incorrectly such that it becomes the version that anyone newly installing or upgrading the package gets. If you find that you accidentally did exactly this

How to change the version of an npm package associated with a specific tag
Members Public

How to search and filter issues and pull requests in Github by author

If you ever find yourself needing to find issues or pull requests created by someone (or a few someones) in Github, here are a few quick tips for how to do that. First up - when you're looking for an individual, you'll want to use the

How to search and filter issues and pull requests in Github by author