3

We are facing a problem of git pull taking too much time and at last it is just failing. We are using company Gitlab.

When it happened

One of my colleague updated the repo with some huge video and image files. And we try to pull the code may be because that files its taking too long and failing also.

What we tried

All of these have not resolved the problem:

  1. We removed that files from repo. Added to git ignore.
  2. git filter-branch.
  3. We've tried removing the large files entirely, using this technique.
  4. Tried the command git gc after git filter-branch.

but for my colleague he able to pull code very fast,

  1. May be because he already has that files in his local
  2. Or maybe he is using SSH, we didn't added it.

Error

remote: Counting objects: 1279, done. remote: Compressing objects: 100% (880/880), done. fatal: The remote end hung up unexpectedly MiB | 743.00 KiB/s
fatal: early EOF fatal: index-pack failed

Edited

  1. The work around we made is, copied the project folder from his system
  2. Copied to my system as fresh.
  3. Created fresh ssh key
Community
  • 1
  • 1
Pramod
  • 1,031
  • 3
  • 13
  • 26
  • possible duplicate of [How to remove/delete a large file from commit history in Git repository?](http://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository) – Buddy Jul 21 '15 at 17:57
  • 1
    What do you mean about your colleague using ssh and yourself not using it? – Musannif Zahir Jul 22 '15 at 11:41
  • @MusannifZahir I tried that with my existing code it was not working. Then i tried after getting his code and created fresh ssh key then its working. But my local changes I need to copy from bake up thats it. – Pramod Jul 23 '15 at 09:40

2 Answers2

5

Your colleague's sync is faster since he already has that branch. It sounds like you might not have properly removed the large files using git filter-branch. Review the history to ensure that it is no longer present.

You might also need to run git gc for garbage collection.

Musannif Zahir
  • 3,001
  • 1
  • 21
  • 31
  • My issue is, after he updated all that files to repo, then i tried to pull the code its taking too much time and failed also. After he removed directly from repo also same issue. And I tried these commands also still same issue exists. – Pramod Jul 23 '15 at 09:00
  • @Pramod I suspect that the repo still has the file - otherwise it shouldn't take as long. Can you try running `git filter-branch --tree-filter 'rm -f path/to/videos' HEAD`. This will run the remove command in every snapshot whether it exists or not - you'll need to update the remove command. Your colleague should be running these commands locally and updating the remote repo. – Musannif Zahir Jul 23 '15 at 09:06
0

git config --global protocol.version 1

This command will resolve the issue. It worked well to me.

Velmurugan A
  • 348
  • 3
  • 7