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
相关推荐
222you1 天前
git的命令
git
Coolbike1 天前
Git工作流
git
~央千澈~1 天前
实战针对本地项目git如何移除旧仓库关联并且添加关联新仓库-优雅草卓伊凡
git
JH30732 天前
git常用命令大全
git
ll5776443322 天前
使用PyTorch实现自定义损失函数以FocalLoss为例的详细教程
git
李少兄2 天前
Git 用户名与邮箱配置指南
git
Blue啊2 天前
code Merge(qcc)
git·gitlab
洛小豆2 天前
Git打标签仓库看不到?她说:豆子,你又忘了加 --tags!
git·后端·github
好奇的菜鸟2 天前
理解 Git 命令 `git reset --hard origin/pre`:版本回退的“利刃”与使用禁忌
大数据·git
春生野草2 天前
git的使用
git