Git pre push hooks ('git push' local checks) #29441
Unanswered
erwango
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before (force) pushing a PR you might want to run some sanity checks to have a first level feedback before being parsed by Zephyr bots.
On my side, I'm running checkpatch.pl using the $ZEPHYR_BASE/.git/hooks/pre-push.
The whole thing is documented here.
As a consequence, each time I run
git push
, checkpatch.pl is parsing each of my commits and if any issue is found, push operation is aborted and I get a feedback on the error (just like Zephyr bot).If required, I can override the behavior using
--no-verify
option on mygit push
command.I'm sharing this tip as I find this convenient and others may like.
But maybe some have more elaborated hooks ?
Beta Was this translation helpful? Give feedback.
All reactions