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
相关推荐
louis.D.10 小时前
git 删除标签完整步骤总结
git
晴天1612 小时前
Git 图形界面工具现状-Day28
git
AD_youyu15 小时前
Git 安装教程
git
hj28625116 小时前
Git 与 DevOps/CI/CD 核心知识整理
git
中科三方16 小时前
DNS解析中的“委派“是什么意思?如何正确配置NS记录?
git·github·dns解析
OPEN-F17 小时前
Python进阶教程:Git版本控制与团队协作
git·python·elasticsearch
深念Y18 小时前
Fork 仓库瘦身指南:从 90MB 到 11MB
git·github·仓库·历史·瘦身·fork·上游
叫我少年18 小时前
Git SSH 配置:从生成密钥到远程连接
git·后端
阿火~1 天前
Git 项目配置与推送完整指南
git
j7~1 天前
【Git】《Git 系列指南(二):Git基本操作与 reset 三种模式》
运维·git·git安装·git基本操作·git配置·创建git仓库·git reset三种模式