commitlint: subject may not be empty / type must be one of Git Origin: Build & delivery OSI layer 7 · Application Last updated 25 Nov 2026

✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty]

A commit-msg hook (commitlint) rejected your message format.

Exact message you may see commitlint subject may not be emptytype may not be empty [type-empty]commit-msg hook failed commitlint✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings husky - commit-msg hook exited with code 1 (error)
Seen on: Git

Meaning

Follow Conventional Commits: type(scope): subject such as feat(auth): add login. See the config for allowed types.

Common causes

  • Message doesn't match convention
  • Merge/revert messages not exempt
  • Empty subject

⚡ Quick fix

  1. Use feat:/fix:/chore: prefixes
  2. Check commitlint.config.js
  3. Amend the message

Detailed fix by platform

Shell

  1. git commit -m "fix(api): handle null response"

How to diagnose

  1. Format — type: subject?
  2. Types — allowed?
  3. Config — which?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

author identity unknown — Author identity unknown *** Please tell me who you are. (Git)author identity unkno…deploy hook — Certbot renewed the certificate but the server still serves the old one (deploy hook / reload failed) (SSL / TLS)deploy hookerror: failed to push some refs: pre-push hook failed — error: failed to push some refs to 'github.com:org/repo.git' (pre-push hook returned non-zero) (Git)error: failed to push…Gerrit: missing Change-Id in commit message — remote: ERROR: [a1b2c3d] missing Change-Id in message footer (Git)Gerrit: missing Chang…hint: The 'pre-commit' hook was ignored because it's not set as executable — hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable. (Git)hint: The 'pre-commit…husky: command not found / .husky/pre-commit: line 4: npx: command not found — .husky/pre-commit: line 4: npx: command not found (Git)husky: command not fo…pre-commit hook failed / husky - pre-commit hook exited with code 1 — husky - pre-commit hook exited with code 1 (error) (Git)pre-commit hook faile…pre-commit: files were modified by this hook — - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook (Git)pre-commit: files wer…commitlin…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.