Git挂起状态/添加/提交 [英] Git hanging on status / add / commit

查看:207
本文介绍了Git挂起状态/添加/提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎遇到了git repo卡住的情况.它挂在所有基本的add,commit命令上,git push返回所有最新信息. 从其他帖子中,我已经完成了git gc和git fsck/ 我认为基本的调试步骤是git status,所以:

I seem to have got a stuck git repo. It hangs on all basic add,commit commands, git push returns everything as up to date. From other posts I have done git gc and git fsck/ I figure the basic debug step is git status, so:

GIT_TRACE=1 git status

返回此重复-我不确定这是什么意思,但似乎是循环的?

returns this repetition - I am not sure what it means but seems in a loop ?

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 

给出输出:

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

我不确定接下来要执行哪些调试步骤,因此请感谢这里的帮助. 这可以在带有Ubuntu的WSL上运行,其他存储库也可以.

I am not sure what debug steps to take next, so appreciate help here. This is running on WSL with Ubuntu, other repos are fine.

推荐答案

似乎我可以解决的唯一方法是再次克隆存储库

Seems the only way I could resolve this was to clone the repo again

更新: 我再次遇到了这个,发现了这篇文章:

UPDATE: I encountered this again and found this post:

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 pull and push

Then do a git pull and push

这篇关于Git挂起状态/添加/提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆