Validate messages and push
| Command | Result |
|---|---|
npx lintlane check-commit --message "feat: add search" |
Validate one message string. |
npx lintlane check-commit --commit-msg-file .git/COMMIT_EDITMSG |
Validate a message file. |
npx lintlane check-commit --rev-range origin/main..HEAD |
Validate every commit in a range. |
npx lintlane check-commit -d |
Validate commits since the detected default branch. |
npx lintlane check-commit --use-default-range |
Long form of -d. |
printf 'feat: add search\n' | npx lintlane check-commit |
Validate a message from standard input. |
git push |
Trigger pre-push, then push if outgoing commit messages pass. |
The pre-push hook provides another message check for commits that bypassed the
commit-time hook. It does not run the full build/test pipeline. Run
npx lintlane run before pushing when you want those results locally.
When an outgoing message fails
Section titled “When an outgoing message fails”Read the reported commit and rule, then correct the message using your normal Git workflow before pushing again. check-commit validates messages; it does not rewrite commit history.
You can validate the current branch before attempting a push:
npx lintlane check-commit --rev-range origin/main..HEADnpx lintlane rungit pushUse the branch your project actually targets instead of origin/main when different.