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
相关推荐
wno70421 小时前
常用的Git命令清单
大数据·git·elasticsearch
真上帝的左手1 天前
3. 代码管理-Git-进阶
git·源代码管理
YIN_尹2 天前
【git原理与使用】git基本操作及底层原理(二)
大数据·git·elasticsearch
程序员爱德华2 天前
Git 命令
git
Cry丶2 天前
Git Rebase 操作备忘
git·rebase
你叶不叶3 天前
abap git 如何从 gitee上在线拉取数据(上一步已经配置好证书)
git·gitee·sap·abapgit
kuroomi4 天前
Git入门
git·kubernetes
daliucheng4 天前
lazygit 上手:日常 git 操作一篇讲完
git
codigger4 天前
大厂git提交规范
git·程序员
挖掘狂人4 天前
六条分支,一条主干:我的 Git 分支管理心得
git·后端·程序员