I made a backup of the repo with rsync. It leaves around a lock file, which after I clear out and run `git fetch --update-head-ok` again, it'll hit the same error. If I put a little debugging into the while loop: while (prefix && *prefix) { if (*refname < *prefix) { printf("Comparing %s to %s\n", refname, prefix); BUG("packed-refs backend yielded reference preceding its prefix"); then my fetch produces: Comparing ð??§ to zuora-params-orders-sorbet/ (in case that doesn't come through well, that's a shaved-ice-emoji, according to a google search, which someone decided to use within one of their branch names) In this case, the utf-8 characters will have individual bytes whose values are greater than 127, which for a signed character will be represented by a negative number. I tried tweaking the loop to: while (prefix && *prefix) { if ((unsigned char)*refname < (unsigned char)*prefix) { printf("Comparing %d to %d\n", *refname, *prefix); printf("Comparing %s to %s\n", refname, prefix); BUG("packed-refs backend yielded reference preceding its prefix"); but that just lets it proceed through the loop four times before dying: Comparing 0 to 97 Comparing to a-params-orders-sorbet/ BUG: refs/packed-backend.c:988: packed-refs backend yielded reference preceding its prefix Aborted (core dumped) meaning it eats up the four bytes from the shaved-ice-emoji and the first four bytes of prefix "zuor" and then hits the error, so I suspect it needs to handle comparisons a little more broadly.