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
相关推荐
YoseZang3 小时前
【手工】git的使用 – 使用git进行项目协作
git
惺忪97984 小时前
git 多个branch对多个版本进行管理
git
夜瞬7 小时前
Git工作流程与常用指令——从本地开发到远程协作
大数据·git·elasticsearch
FEF前端团队8 小时前
开发知识库 #01:Git 全面操作教程
git·github
weixin_5316518111 小时前
Git 操作指南
大数据·git·elasticsearch
一个程序猿老马14 小时前
003、Git核心概念:仓库、工作区、暂存区、版本库
大数据·git·elasticsearch
披着羊皮不是狼14 小时前
Git完整学习总结
git·学习·elasticsearch
DevilSeagull14 小时前
MySQL(1) 安装与配置
java·数据库·git·mysql·http·开源·github
一个程序猿老马15 小时前
005、Git三板斧(1):git add - 将文件纳入版本管理
大数据·git·elasticsearch
Cyber4K15 小时前
【DevOps专项】Git 部署及使用方法
运维·git·devops