繁体   English   中英

Git 挂在状态/添加/提交

[英]Git hanging on status / add / commit

我似乎有一个卡住的 git 回购。 它挂在所有基本的添加、提交命令上,git 推送返回所有内容为最新的。 从其他帖子我已经完成了 git gc 和 git fsck/ 我认为基本调试步骤是 git 状态,所以:

GIT_TRACE=1 git status

返回此重复-我不确定它的含义,但似乎在循环中?

16:51:27.575926 git.c:344               trace: built-in: git 'status'
16:51:27.669849 run-command.c:334       trace: run_command: 'status' '--porcelain'
16:51:27.672090 exec_cmd.c:120          trace: exec: 'git' 'status' '--porcelain'
16:51:27.680657 git.c:344               trace: built-in: git 'status' '--porcelain'
16:51:27.730535 run-command.c:334       trace: run_command: 'status' '--porcelain'
16:51:27.732571 exec_cmd.c:120          trace: exec: 'git' 'status' '--porcelain'  

也试过:

git count-objects -v 

给出 output:

count: 0
size: 0
in-pack: 28167
packs: 1
size-pack: 1117374
prune-packable: 0
garbage: 0
size-garbage: 0

我不确定下一步要采取什么调试步骤,所以在这里感谢帮助。 这是在带有 Ubuntu 的 WSL 上运行的,其他存储库都可以。

似乎我能解决这个问题的唯一方法是再次克隆回购

更新:我再次遇到这个并找到了这篇文章:

https://medium.com/@marcosantonocito/fixing-the-gh001-large-files-detected-you-may-want-to-try-git-large-file-storage-43336b983272

EG基本上...

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch fileNameToRemove.extn'

或者

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch pathToFile/fileNameToRemove.extn'

然后做一个git拉推

之前已经看到过 git 状态的无限循环(以 hbons/SparkleShare 问题 1170为例)

下一步,使用 Git 2.25+,将启用 trace2,我在这里介绍

GIT_TRACE2_EVENT=1 GIT_TRACE2_PERF=1 git status

您可以在Jeff Hostetler的“ 使用 Trace2 深入了解 Git 性能”中了解更多信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM