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
相关推荐
心无旁骛~1 小时前
Git笔记汇总,持续更新~
笔记·git
{⌐■_■}10 小时前
【git】工作场景下的 工作区 <-> 暂存区<-> 本地仓库 命令实战 具体案例
大数据·git·elasticsearch·golang·iphone·ip·etcd
李狗蛋儿啊12 小时前
zero自动化框架搭建---Git安装详解
运维·git·自动化
人工干智能14 小时前
科普:“git“与“github“
git·github
{⌐■_■}1 天前
【git】提交修改、回撤、回滚、Tag 操作讲解,与reset (--soft、--mixed、--hard) 的区别
大数据·git·elasticsearch
GardenTu1 天前
初尝git自结命令大全与需要理解的地方记录
git·github
真就死难2 天前
Git是什么
git
机械心2 天前
代码管理git详细使用教程及最佳实践路径
git
hkj88082 天前
Git 常用命令
git
dawnkylin2 天前
通过 fork 为项目做出贡献
git·github