fatal: not a git repositoryfatal: not a git repository
当前目录不在任何 Git 仓库内。
浏览所有 50 个 Git 错误 错误代码,包含原因、修复方法和示例。
fatal: not a git repository当前目录不在任何 Git 仓库内。
CONFLICT (content): Merge conflictGit 无法自动合并更改,因为同一行在两个分支中均被修改。
You are in 'detached HEAD' stateHEAD 指向某个具体提交而非分支,此时新提交将成为孤立提交。
fatal: refusing to merge unrelated historiesGit 拒绝合并两个没有共同祖先的分支。
error: Your local changes would be overwrittenGit 拒绝执行操作,因为该操作会覆盖未提交的本地更改。
error: failed to push some refs推送被拒绝,因为远端存在你本地没有的更改。
error: non-fast-forward update此次推送会重写远端分支历史,已被拒绝。
fatal: A branch named 'x' already exists仓库中已存在同名分支。
error: Cannot delete branch currently checked out无法删除当前所在的分支。
nothing to commit, working tree clean没有可提交的更改;工作目录与最新提交一致。
error: empty commit message因提交信息为空,提交被中止。
fatal: ambiguous argumentGit 无法判断该参数指的是版本引用、路径还是其他内容。
fatal: bad revision指定的版本(提交哈希、分支名、标签)不存在。
fatal: remote origin already exists同名远端已存在于配置中。
fatal: 'origin' does not appear to be a git repositoryGit 无法连接到指定的远端仓库。
fatal: Authentication failedGit 与远端服务器的身份验证失败。
Permission denied (publickey)SSH 身份验证失败,因为服务器未接受你的公钥。
fatal: unable to access: Could not resolve hostGit 远端主机的 DNS 解析失败。
error: could not apply commit变基过程中应用某个提交时发生冲突。
error: could not apply (cherry-pick)cherry-pick 提交时发生了冲突。
fatal: Unable to create lock file存在 Git 锁文件(.lock),阻止了操作的执行。
error: object file is empty某个 Git 对象文件已损坏且不含任何数据。
error: corrupt loose object某个 Git 对象文件已损坏,无法读取。
error: pathspec did not match any files指定的文件模式未匹配任何已跟踪的文件。
error: LFS object not found无法从 LFS 服务器下载 Git LFS 跟踪的文件。
fatal: No submodule mapping found引用了 Git 子模块,但子模块未正确初始化。
remote: error: File is too large某个文件超过了远程托管服务允许的最大文件大小。
fatal: shallow update not allowed从浅克隆进行的推送被拒绝,因为远程不允许浅更新。
error: cannot rebase: You have unstaged changesGit 拒绝执行变基,因为工作目录中存在未提交的更改。
fatal: bad object引用的 Git 对象不存在或已损坏。
There is no tracking information for the current branch当前分支未配置追踪远程分支。
Already up to date.当前分支已包含您尝试合并或拉取的分支的所有更改。
fatal: refusing to merge unrelated historiesGit 拒绝合并没有共同祖先提交的分支。
remote: error: hook declined to update服务器端 Git 钩子拒绝了本次推送。
remote: error: GH006: Protected branch update failed由于分支保护规则,向受保护分支的推送被拒绝。
fatal: Not possible to fast-forward, aborting使用 --ff-only 的拉取失败,因为两个分支已发生分叉。
fatal: tag already exists指定名称的标签已存在。
No local changes to savegit stash 未找到任何已修改的已跟踪文件可供暂存。
error: No stash entries found暂存区中没有可供应用或弹出的变更。
warning: CRLF will be replaced by LFGit 正在将行尾符从 Windows 风格(CRLF)转换为 Unix 风格(LF)。
fatal: This operation must be run in a work tree该操作需要工作树,但当前仓库是裸仓库(无工作目录)。
error: unable to find object仓库中引用的某个 Git 对象无法找到。
fatal: branch is already checked out at another worktree该分支无法被检出,因为它已在另一个工作树中被检出。
warning: Large files detectedGit 检测到可能导致仓库膨胀的大文件。
error: gpg failed to sign the dataGit 无法使用 GPG 对提交或标签进行签名。
fatal: refname is not a valid ref name分支或标签名称包含无效字符。
error: Entry has been modified in the work tree由于工作树中存在已修改的文件,Git 操作被阻止。
error: pack exceeds maximum allowed sizeGit pack 操作超出了服务器允许的最大大小。
error: sparse-checkout is not enabled尝试执行 sparse-checkout 操作,但该功能未启用。
fatal: index file corruptGit 索引文件(.git/index)已损坏。