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
相关推荐
Cosmoshhhyyy14 小时前
mac环境下安装git并配置密钥等
git·macos
yuwei02114 小时前
git大全解
git
小林的技术分享18 小时前
版本控制系统-Git 学习 《progit》电子书学习记录 第一章 (仅隔个人学习记录用)
git
weixin_4569042720 小时前
Git登录配置的详细方法
git
鄃鳕1 天前
Git , 本地落后远端
git
Yusei_05231 天前
迅速掌握Git通用指令
大数据·git·elasticsearch
qq_377572772 天前
git commit - revert + reset + checkout + reorder
git
2301_767233222 天前
Git使用和理解上的一些问题
git
nyf_unknown2 天前
(vue)将文件夹打成tar包, Git Bash(推荐)具体使用
vue.js·git·bash
兔老大RabbitMQ2 天前
Git Revert 特定文件/路径的方法
git