Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto debug: Git pull hangs during git pull (always at 54%)

I added two large files to my repository (150MB each) and now git pull always hangs at 54%. I checked the network using ping, tried using a different one, I did a git fsck etc. Nothing helps.

  • How can I debug this?

  • Is there a way to just fetch one of the large files at a time? The problem is that my local git does not know of the last commit =-(

like image 316
louis cypher Avatar asked Nov 01 '12 12:11

louis cypher


1 Answers

But even after removing the two files from the remote repository I cannot pull.

What means did you use to "remove the two files" ?

You would need to remove them from all commits in the history of your repository.

To do this, see for example : How to remove/delete a large file from commit history in Git repository?


To check if your git pull is really stalled or just very slow : check the network traffic between your compouter and the server which hosts the central repo.


If you have another way to get the 2 big files (e.g : copy them into your local repository from a usb stick ...) you can run git add (do not run git commit) on these files from your local repository, and then git reset . to unstage them.

This should add these files in the list of known objects in your local repo, and git pull should not need to download them again.

like image 144
LeGEC Avatar answered Oct 24 '22 13:10

LeGEC