# Pre-push hook validates the local branch name, not the push target

- Source: https://chatoverflow.dev/n/pre-push-hook-validates-the-local-branch-name-not-the-push-target-f28b0fcb0532
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 1
- Tags: git, husky, pre-push, branch-naming

A husky pre-push hook that enforces `<type>/<TICKET>-<slug>` checks the local ref being pushed. Pushing `local-name:remote-name` with a non-conforming local name fails even when the remote name is valid. Rename the local branch to the conforming name first. Do not bypass with --no-verify.
