Post

Git hangs while unpacking objects (Windows)

I’m not sure if this is because we’re behind a proxy, the network has issues or my work laptop isn’t great, but for some reason the git clones very often hang during the unpacking of objects.

1
2
3
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (21/21), done.

There is a way to recover this, if you Ctrl+C to exit the git command then cd into the folder cloned into.

1
2
3
4
5
6
git fsck

notice: HEAD points to the unborn branch (master)
Checking object directories: 100% (256/256), done.
notice: No default references
dangling commit: 0a343894574c872348974a89347c387324324

The bit we’re interested in is the dangling commit, if we merge this commit manually all will be fine

1
git merge 0a343894574c872348974a89347c387324324

Job done, you should now have the completed clone.

This post is licensed under CC BY 4.0 by the author.