Troubleshooting
Every error message, and what to do about it.
"No staged changes." Stage files first with git add. gitmit only describes what's staged.
"OPENAI_API_KEY is not set." You chose --provider openai (or set it in config) but no key was found. Add it to ~/.config/gitmit/.env, or use --provider rules to work offline.
"invalid API key (HTTP 401)" or "unknown model (HTTP 404)". Check the key, or set a model your account can use with OPENAI_MODEL or ANTHROPIC_MODEL.
"Possible secrets found in the staged changes." Unstage the file named in the message, or re-run with --redact if you're sure it's safe to send a redacted version.
"Could not load the commitlint config." Your commitlint config extends a preset that isn't installed. Run your package manager's install in the repository, or set "commitlint": false in the gitmit config.
"A ticket ID is required, but the branch has none." Your config sets ticket.required. Rename the branch to include the ID, e.g. git branch -m feat/PROJ-123-short-name.
"Cannot split during a merge." Finish or abort the merge (or rebase or cherry-pick) first.
"cannot reach http://localhost:11434; is Ollama running?" Start Ollama with ollama serve. For a missing model, run ollama pull <model>.
The hook does nothing. It only runs for a plain git commit without -m or -F. Check that it's installed with gitmit hook install, and look for a # gitmit: no suggestion (...) comment in the editor explaining why.
"My commits aren't on GitHub." gitmit commits locally, like git commit. Run git push, or use gitmit --push (or "push": true in your config).
"git push failed. Your commits were kept." Usually the remote has commits you don't have yet. Run git pull --rebase, then git push.
Not sure what settings apply? Run gitmit config.