1

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.

Datadimension
  • 872
  • 1
  • 12
  • 31

2 Answers2

1

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

UPDATE: I encountered this again and found this post:

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

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

Datadimension
  • 872
  • 1
  • 12
  • 31
  • `filter-branch` is obsolete: consider `filter-repo`. See https://stackoverflow.com/a/63878194/6309 – VonC Sep 23 '20 at 16:02
0

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250