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
相关推荐
流浪0014 小时前
Git篇(三):吃透远程协作:SSH 密钥、分支、标签全流程实战指南
运维·git·ssh
莫成21 小时前
git相关命令查阅
git
ljh5746491191 天前
git stash 和 git stash apply
git
慕容引刀1 天前
告别Commit信息纠结:使用Git AI Commit插件实现规范化提交
人工智能·git·github·visual studio code·visual studio
敲代码的嘎仔2 天前
实习日志day6--实习日志day6--title命名规范化&businessType纠正&补充缺失的@Log注解&报警与通信模块补充&产出阶段总结文档
java·开发语言·人工智能·git·python·实习·大二
刘马想放假2 天前
Git 从入门到进阶:一篇吃透版本管理的实战指南
git·gitlab
开发者联盟league2 天前
git commit报错No .pre-commit-config.yaml file was found
git
猫老板的豆2 天前
git实战
git
风曦Kisaki2 天前
# Linux实战笔记-HIS项目实战Day01:版本控制与Git基础
linux·笔记·git
鲸~屿2 天前
Git上传本地文件到GitHub教学指南
git·github