Git使用问题汇总附带解决方法(持续更新)

Git使用问题汇总附带解决方法

  • [一 git pull 代码时报错: Auto packing the repository in background for optimum performance. See "git help gc"](#一 git pull 代码时报错: Auto packing the repository in background for optimum performance. See “git help gc“)

一 git pull 代码时报错: Auto packing the repository in background for optimum performance. See "git help gc"

问题:git本地仓库,如果长时间不进行清理,拉取代码的时候突然提示: Auto packing the repository in background for optimum performance

原因:本地一些 "悬空对象"太多(git删除分支或者清空stash的时候,这些其实还没有真正删除,成为悬空对象,可以使用merge命令可以从中恢复一些文件)

按步骤执行一下命令:

1.查看悬空对象:

csharp 复制代码
git fsck --lost-found

2.清理悬空对象:

csharp 复制代码
git gc --prune=now

3.再更新代码

csharp 复制代码
git pull
相关推荐
CodexDave8 小时前
数据库连接池耗尽:排查顺序与三层兜底
服务器·前端·数据库·git·云原生·容器·kubernetes
乐观的Terry9 小时前
5、发布系统-Git 集成
大数据·git·elasticsearch
不怕犯错,就怕不做10 小时前
GIT的简单打patch应用format-patch and git am
linux·git·全文检索
Byron Loong10 小时前
【Git】如何检查 Ubuntu 系统上 gitLab 是否开启
git·ubuntu·gitlab
lar_slw12 小时前
git删除上一次提交
git
leoZ2311 天前
Git 集成实战完全指南(四):Git 冲突解决
大数据·git·elasticsearch
枫荷1 天前
Git LFS 大文件优化说明
git
techdashen1 天前
不用再反复 stash:用 Git Worktree 同时开发多个分支
大数据·git·elasticsearch
leoZ2312 天前
Git 集成实战完全指南(八):团队协作最佳实践
git
晴雨天️2 天前
Git工具使用指南
笔记·git