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
相关推荐
那年窗外下的雪.2 小时前
AIDC 学习日志|第 25 天|设备输出反推、MAC Flapping 与 EAD 撤销
前端·网络·git·学习·macos
末央&14 小时前
GIT工具的基础指令与使用
git
彧azz18 小时前
Git 入门实操实例:从安装到远程仓库全流程
大数据·笔记·git·学习·elasticsearch
idealzouhu1 天前
Git 命令全景解析:基于数据流向的认知框架
git
星e雨1 天前
Window Git安装
git
旧梦星轨1 天前
Git Flow 工作流实践
git·gitee·gitlab·github
༄久梦༒长醉༻1 天前
技术笔记——Git Worktree工作树
笔记·git
彧azz1 天前
Git 学习指南:从入门到进阶的完整实践手册
git·学习
浅念-2 天前
一文吃透Git:本地操作|冲突处理|远程协作|GitFlow工作流详解
大数据·git·elasticsearch·搜索引擎·gitflow
滕州市燕猫虎计算机科技工作室个体工商户2 天前
Git常用命令汇总
git