git
user_error
ai_generated
true
未添加任何内容到提交,但存在未跟踪的文件(使用 "git add" 进行跟踪)
nothing added to commit but untracked files present (use "git add" to track)
ID: git/no-commit-until-add
92%修复率
85%置信度
1证据数
2023-01-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| git 2.30.0 | active | — | — | — |
| git 2.40.0 | active | — | — | — |
| git 2.45.0 | active | — | — | — |
根因分析
用户尝试提交但未暂存任何文件;工作目录中仅存在未跟踪的文件。
English
User attempted to commit without staging any files; only untracked files exist in the working directory.
官方文档
https://git-scm.com/docs/git-commit解决方案
-
Stage the untracked files with 'git add <file>' or 'git add .' to include all untracked files, then commit.
-
Use 'git add -A' to stage all changes including new files, then commit.
无效尝试
常见但无效的做法:
-
70% 失败
Running 'git commit -a' will only stage modified tracked files, not untracked ones.
-
90% 失败
Using 'git commit -m "message"' without staging will still fail.
-
40% 失败
Deleting the untracked files manually may cause data loss if they are needed.