0

I have a large personal repo which I use to keep my daily work files. I started using it since my laptop crashed last year and OneDrive could not restore all files. Particularly it had trouble with long filepaths. Obviously this repo has grown over time. I remove older files after a few months. Every day, a new branch is created and that day's changes get pushed to the repo.

From yesterday, this process is failing. I have removed some files, reducing total size by ~40%, but it is still failing. The compression stage of the push goes to 99%, number of files reach 5129-5137 (the number varies in that range) and then the remote end hangs up, connection to the remote host is cut off. I have tried in both git bash and tortoisegit, screenshot for the latter posted below.

How can I resolve this issue?

TortoiseGit Screenshot

Compile Commit
  • 375
  • 1
  • 5
  • 17
  • Did you use `git filter-branch` or `BFG` to remove the files? If you simply remove some files and then `git commit`, the repository metadata actually gets bigger. – ElpieKay Apr 30 '21 at 09:08
  • I simply deleted. Didn't know about this increase in metadata. – Compile Commit Apr 30 '21 at 09:23
  • See https://stackoverflow.com/questions/43762338/how-to-remove-file-from-git-history. – ElpieKay Apr 30 '21 at 09:25
  • Bigger http buffer? – matt Apr 30 '21 at 09:25
  • The http buffer is set to 1024000000. I just used git filter-branch and then tried to push. Same issue remains. – Compile Commit Apr 30 '21 at 09:57
  • Technically those are object counts, not file counts (but in many cases there's not a lot of difference anyway). My first guess would be that the compression takes long enough on your end, that their end gives up on you and "hangs up the phone". In this case using ssh (not https) and a keep-alive option might help. – torek Apr 30 '21 at 16:00
  • I am using ssh anyway. But how to enable a keep-alive option for git bash or TortoiseGit? – Compile Commit May 01 '21 at 11:24

1 Answers1

0

I followed the following answer in a separate question regarding keeping OpenSSH connections alive in Windows.

ServerAliveInterval

Compile Commit
  • 375
  • 1
  • 5
  • 17