0

Today I forget to add ignore jar lines to .gitignore, now the jar file(>100MB) added to my git(git version 2.32.0) repo and I could not push to the remote repo:

warning: redirecting to https://gitlab.exaple.com/development/soa-zhuolian.git/
Enumerating objects: 70, done.
Counting objects: 100% (70/70), done.
Delta compression using up to 12 threads
Compressing objects: 100% (37/37), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (56/56), 104.61 MiB | 13.32 MiB/s, done.
Total 56 (delta 5), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
(base)

then I want to list the big jar file from my local repo:

git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -5 | awk '{print$1}')"

but this command shows error:

fatal: Cannot open existing pack file '.git/objects/pack/*.idx'

why would this happen? what should I do to avoid this problem?

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • 1
    Does this answer your question? [Github Push Error: RPC failed; result=22, HTTP code = 413](https://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413) – Elias Holzmann Aug 31 '21 at 12:34
  • No,I want to know why shows this error:`fatal: Cannot open existing pack file '.git/objects/pack/*.idx' @EliasHolzmann ` – Dolphin Aug 31 '21 at 12:50
  • 1
    Sorry, you're right, I skimmed your question too quickly. Have you checked whether there are pack files inside `.git/objects/pack/*.idx`? – Elias Holzmann Aug 31 '21 at 13:08
  • 2
    The large file probably is not yet in a pack object in your local repository. (`git push` builds a temporary pack to send, but removes it afterward.) – torek Aug 31 '21 at 14:37
  • I check the `.git/objects/pack/` folder and find the folder have no files. @EliasHolzmann – Dolphin Sep 01 '21 at 01:36

0 Answers0