7

After long hours of searching for this specific problem, i didn't find another solution but post a question here:

Scenario:

  1. Two remote servers: git.address-a.com and git.address-b.com
  2. One local repository with two remotes: origin to git.address-a.com and remote-b to git.address-b.com
  3. Every day, i check if something was pushed to remote-b.
  4. If anything was pushed, i create a new local branch based on the master (tracking origin/master), fetch the changes from remote-b and merge it in my new branch (branch-b for instance).
  5. If everything is ok and there is no conflict (i fix them manualy if existe some), i just checkout back to the master and merge with branch-b, so i push master to origin/master.

Description of the problem:

This workflow had worked very well, but for some reason, in the last week at the daily integration, git is returning me a message just in the push:

error: unpack failed: error Missing commit 041460e3edf2f00f75022ce864535ffa2331f1c3
To https://myuser@git.address-a.com/git/r/project.git
! [remote rejected] master -> master (n/a (unpacker error))

This commit (shorted: 041460) is from two weeks ago and exists in both remotes. But, now, when i fetch and merge the changes from remote-b to branch-b, merge it to master and try to push to origin this error is being shown.

Commands executed:

#git checkout -b branch-b
#git fetch remote-b
#git merge remote-b/master
#git checkout master
#git merge branch-b
#git push origin master

Enviroment:

Git in remotes: 1.7.1 Git in my machine: 1.9.1 Gitblit 1.6.2 in both remotes

Tried:

  • Rebase
  • Branch in the parent of the commit informed by git and rebase after that.
  • Delete local project, redo all the integration steps again.
Diogo Paschoal
  • 1,507
  • 1
  • 14
  • 16

2 Answers2

0

Have you tried

git push --no-thin origin master 

as well?

Mischa
  • 623
  • 5
  • 17
  • sadly, our devops environment had change the requirements now and this scenario had changed. Now it's impossible to make the test again with the same conditions with the same servers. – Diogo Paschoal Dec 13 '17 at 20:53
0

It may be some error on your local repository. Try this git command to Cleanup unnecessary files and optimize the local repository :

git gc
Riceball LEE
  • 1,541
  • 18
  • 18