flopcoder
flopcoder

Reputation: 1175

Index-pack abnormal exit during git push

I am continuously getting error after rebase master branch at my feature branch. I have searched google and find some solutions but nothing worked for me. After rebase I execute git status. it returns like this

On branch test/263-junit-test-390
Your branch and 'origin/test/263-junit-test-390' have diverged,
and have 60 and 35 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

After that I run git push -f origin branch_name. I am getting this.

Counting objects: 568, done.
Compressing objects: 100% (271/271), done.
Writing objects: 100% (568/568), 9.32 MiB | 703.00 KiB/s, done.
Total 568 (delta 304), reused 454 (delta 202)
error: index-pack died of signal 98/304)
error: remote unpack failed: index-pack abnormal exit

Upvotes: 0

Views: 4070

Answers (1)

flopcoder
flopcoder

Reputation: 1175

This is happen when we committed large file anytime. Suppose after committed, we delete this file but if it once pushed in past it will make problem. Although these large files deleted it will repack again when we push our local changes on git and then it takes long time.

We can check our commit history by using this command

git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

Then we have to clear these file history from git. and then it will work. To clear history we can follow this link

https://help.github.com/articles/removing-sensitive-data-from-a-repository/

NB : I added this answer because may it helps to others

Upvotes: 2

Related Questions