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
相关推荐
Rysxt_15 小时前
Git Rebase 变基教程:作用、使用场景与合并的区别
git·变基
刘某某.17 小时前
提交 git 的三种方式
git
bigHead-19 小时前
Git 修改远程仓库地址的几种方法
git
杀手不太冷!20 小时前
Jenkins的安装与使用;git clone url的时候,url为http和ssh时候的区别
git·http·jenkins
qq_2290580121 小时前
GIT使用方法
git
YMGogre21 小时前
Git 多人协作开发
git
凯子坚持 c1 天前
Git 多人协作深度解析:从工作流模拟到仓库维护
git
要站在顶端1 天前
克隆大型仓库卡住(7%每次就卡住了)
git
五月底_1 天前
上传大量文件到github repo
git·github
rannn_1112 天前
【Git教程】概述、常用命令、Git-IDEA集成
java·git·后端·intellij-idea