簡體   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