Git 错误错误
fatal: shallow update not allowedfatal: shallow update not allowed
从浅克隆进行的推送被拒绝,因为远程不允许浅更新。
gitlinuxwindowsmacos
导致此错误的原因
您的仓库是浅克隆(通过 --depth 创建),而远程不接受来自浅克隆的推送。推送需要完整的历史记录。
如何修复
取消浅克隆限制:git fetch --unshallow origin。然后重新推送。对于 CI 环境,增加克隆深度或改用完整克隆替代浅克隆。
示例
git fetch --unshallow origin相关错误代码
Git 错误错误
CONFLICT (content): Merge conflict合并冲突
Git 无法自动合并更改,因为同一行在两个分支中均被修改。
gitlinuxwindowsmacos
查看详情 Git 错误错误
fatal: remote origin already existsfatal: remote origin already exists
同名远端已存在于配置中。
gitlinuxwindowsmacos
查看详情 Git 错误信息
No local changes to saveNo local changes to save
git stash 未找到任何已修改的已跟踪文件可供暂存。
gitlinuxwindowsmacos
查看详情 Git 错误错误
fatal: Unable to create lock filefatal: Unable to create lock file
存在 Git 锁文件(.lock),阻止了操作的执行。
gitlinuxwindowsmacos
查看详情 Git 错误致命
error: object file is emptyerror: object file is empty
某个 Git 对象文件已损坏且不含任何数据。
gitlinuxwindowsmacos
查看详情 Git 错误错误
fatal: Not possible to fast-forward, abortingfatal: Not possible to fast-forward, aborting
使用 --ff-only 的拉取失败,因为两个分支已发生分叉。
gitlinuxwindowsmacos
查看详情