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
相关推荐
AI视觉网奇10 小时前
git 标签学习笔记
git
XPiedPiperX14 小时前
git 合并多次提交 commit
git
Batman_curry15 小时前
git 操作
git
ZhongyiChen20 小时前
Git 是实现 Windows 之 Linux 开发环境的利器
git·操作系统·命令行
CyberTM21 小时前
终端党的福音!开源Git命令速查工具Git Cheat Sheet TUI
git·python·go
9ilk1 天前
【Git】--- 分支管理
git
杂学者1 天前
Git的安装
git
海浪在开花1 天前
vscode查看文件历史git commit记录
git·vscode