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
相关推荐
阿米亚波10 小时前
【C/C++包管理器】vcpkg(by microsoft)
c语言·c++·git·vscode·microsoft·github·vcpkg
苍煜11 小时前
Git Worktree 多工作树实战教学-工作多分支实用教程
git
RainingTime14 小时前
新版IDEA使用传统用户名、密码登录Git
git
DevangLic1 天前
【诡异的空文件夹 和 git:冲突合并】最新的尝试
git
舒一笑1 天前
Windows + WSL2 完整复现 Avernet WAIC 6 Bot 协作演示
人工智能·git·开源
生戎马 平安京策1 天前
git寻根——^和~的区别
git
技术小结-李爽1 天前
【工具】git远程分支合并
git·gitee
RootKai1 天前
Git命令与基本使用流程
git
AdaTina1 天前
关于git的初始操作
git