[BUG] /commit-commands:commit doesn't work when there are no commits yet
Resolved 💬 3 comments Opened Feb 11, 2026 by mulka Closed Apr 8, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The commit command doesn't work when there are no commits yet. Here's what happens:
/commit-commands:commit
⎿ Error: Bash command failed for pattern "!git log --oneline -10": [stderr]
fatal: your current branch 'main' does not have any commits yet
What Should Happen?
It should help the user create an initial commit.
Error Messages/Logs
Steps to Reproduce
Create a new repo with git init
Run Claude Code
Make sure commit-commands plugin is installed
Run /commit-commands:commit
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.39 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗