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
相关推荐
import_random9 小时前
[git]只有git,没有github, 如何工作
git·github
import_random9 小时前
[git]先创建远程仓库or先创建本地项目
git·github
Linux实战笔记11 小时前
rebase 变基引发提交哈希重写与指针机制分析
git·rebase·提交哈希·分支模型·代码合并
小稀土12312 小时前
私有化研发协同系统并行期:旧 Jira 与新 Git 并存 6 条数据规则
git
Madison-No713 小时前
Git版本控制工具(二)
git
Brookty16 小时前
Git 与 GitHub|第一阶段:仓库、版本历史与 Git 对象模型(上篇)
git·github
Kimnol1 天前
我的第一次 Git 贡献:从 fork 到合并 PR #3130
git
鬼手点金1 天前
消息的四种角色
java·前端·人工智能·git·深度学习
齐 飞2 天前
idea中git误操作撤回git reset --hard ‘HEAD@{1}‘
java·git·intellij-idea
长成一棵参天树2 天前
React15 vs React16 核心区别
git·vscode