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
相关推荐
AIMath~14 小时前
向github中上传文件过大超过50M怎么办
网络·git·github
AIMath~18 小时前
如何将一个新的文件夹使用git 工具提交到github新仓库中
git·github
满天星830357718 小时前
【Git】原理及使用(二) (版本回退)
linux·git
愿天垂怜19 小时前
【C++脚手架】ffmpeg 库的介绍与使用
linux·服务器·开发语言·c++·ide·git·ffmpeg
月夜的风吹雨19 小时前
Linux 基础开发工具详解:从 yum 到 gdb 实战指南
linux·git·ubuntu·centos·vim
好运yoo20 小时前
git cherry-pick
git
不是光头 强20 小时前
Obsidian Git 插件安装与配置完全指南
git
.千余20 小时前
【C++】C++核心语法:函数重载与缺省参数原理与避坑
c语言·开发语言·c++·经验分享·笔记·git·学习
meowrain21 小时前
Git HTTPS Token 凭据配置指南
git·网络协议·https
Ws_1 天前
Git + Gerrit 第二课:diff、暂存区与撤销修改
git