If you ever come across git hanging after completing “Resolving deltas: 100%
“, then remember this can still happen with recent git versions; the below output was with git version 2.24.1.windows.2
.
C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git Cloning into 'bin'... remote: Enumerating objects: 74, done. remote: Counting objects: 100% (74/74), done. remote: Compressing objects: 100% (54/54), done. remote: Total 1063 (delta 30), reused 39 (delta 15) Receiving objects: 100% (1063/1063), 26.74 MiB | 516.00 KiB/s, done. Resolving deltas: 100% (385/385), done.
or (after pressing Ctrl-C
):
C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git Cloning into 'bin'... remote: Enumerating objects: 74, done. remote: Counting objects: 100% (74/74), done. remote: Compressing objects: 100% (54/54), done. remote: Total 1063 (delta 30), reused 39 (delta 15) Receiving objects: 100% (1063/1063), 26.74 MiB | 516.00 KiB/s, done. Resolving deltas: 100% (385/385), done. fatal: index-pack failed
Retry after a while
Sometimes this is as easy as waiting until the remote system comes to its senses. In this case, waiting some 8 hours resolved it:
C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git Cloning into 'bin'... remote: Enumerating objects: 74, done. remote: Counting objects: 100% (74/74), done. remote: Compressing objects: 100% (54/54), done. remote: Total 1063 (delta 30), reused 39 (delta 15) Receiving objects: 100% (1063/1063), 26.74 MiB | 748.00 KiB/s, done. Resolving deltas: 100% (385/385), done.
In my case this worked, even though GitLab did not show any problems in their status history: [WayBack] GitLab System Status History.
I waited (and succeeded) because of [WayBack] git – How to solve’fatal: index-pack failed’? – Stack Overflow.
Check the index and get the most recent
Some links that I want to check out later:
- [WayBack] git clone hangs · Issue #2145 · github/hub · GitHub
- [WayBack] Stas’s blog: git hangs after “Resolving deltas”
When it hangs, just kill the process with Ctrl+C and run this command in repository folder:
$ git fsck notice: HEAD points to an unborn branch (master) Checking object directories: 100% (256/256), done. Checking objects: 100% (3298/3298), done. notice: No default references dangling commit 2916d1238ca0f4adecbda580ef4329a649fc777c
Now just merge that dangling commit:
$ git merge 2916d1238ca0f4adecbda580ef4329a649fc777c
and from now on you can enjoy repository content in any way you want.
- [WayBack] git clone hangs after Resolving deltas: 100% [#2459689] | Drupal.org
Likely workaround[4] that doesn’t require git update:
Since the pack files have been downloaded correctly all you need to do is to interrupt the process with Ctrl+C, do a git fetch to fetch branch information from the remote repository and checkout the master (or any other) branch again with a git checkout master.
- [WayBack] https – git clone with NTLM proxy hangs after resolving deltas – Stack Overflow (thanks [WayBack] Ceottaki)
- Interrupt the git process that hung on resolving deltas with
Ctrl+C
- Fetch branch information with
git fetch
- Checkout the master branch (or any other branch) with
git checkout master
This made git set up my branch master to track remote branch master and unpack the files correctly while also preserving branch information.
- Interrupt the git process that hung on resolving deltas with
Searches
- [WayBack] git hangs “resolving deltas” – Google Search
- [WayBack] git hangs “resolving deltas” “fatal: index-pack failed” – Google Search
- [WayBack] git “hangs” “resolving deltas: 100%” “2.24” – Google Search
–jeroen