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'
also tried:
git count-objects -v
gives output:
count: 0
size: 0
in-pack: 28167
packs: 1
size-pack: 1117374
prune-packable: 0
garbage: 0
size-garbage: 0
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 basically...
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch fileNameToRemove.extn'
or
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch pathToFile/fileNameToRemove.extn'
Then do a git pull and push
An infinite loop on git status has been seen before ( hbons/SparkleShare issue 1170 as an example)
The next step, with a Git 2.25+, would be to enable trace2, which I present here :
GIT_TRACE2_EVENT=1 GIT_TRACE2_PERF=1 git status
You can see more in " A Deep Dive into Git Performance using Trace2 " from Jeff Hostetler .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.