4

I'm trying to synchronize my forked repository on github. I follow instruction from this post: How do I update a GitHub forked repository?, but unfortunately when I push changes to GitHub I receive the following error:

remote: error: object 349e70933e59bab5094d8991a7ac35862d46e759:not properly sorted
remote: fatal: Error in object
error: unpack failed: index-pack abnormal exit

What does it means and how to resolve this problem?

Community
  • 1
  • 1
Sławomir Rosiek
  • 4,038
  • 3
  • 25
  • 43

2 Answers2

2

Looks like you local repository is broken. :(

If you don't have any important changes in your local repository just delete it and clone a new one from the remote repository.

michas
  • 25,361
  • 15
  • 76
  • 121
  • I do that multiple times but problem persists – Sławomir Rosiek Mar 16 '14 at 09:59
  • That is strange. If it was possible to transfer the repository from the remote repository to your local repository it should be possible to transfer it back. What is the output of `git --version`? – michas Mar 16 '14 at 10:06
  • git version 1.8.3.msysgit.0 and there is problem with transfer repository back to remote unit I don't merge changes from the upstream – Sławomir Rosiek Mar 16 '14 at 10:08
1

but in fact I don't have any changes in that branch. Is there any way to just get it as it is in original repository?

If you don't have any personal commit in master, you can try a:

git checkout master
git reset --hard upstream/master
git push origin master

If you had commit done on master, it is best to isolate them first in their own branch

git checkout master
git branch myBranch
... reset and push master
git checkout myBranch
git rebase master
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Unfortunately this cause the same error when I making push – Sławomir Rosiek Mar 16 '14 at 09:44
  • @SławomirRosiek Could you try a making a second fork, just to see if you can reproduces your changes on a local clone of that second fork and push (to the second fork) said changes from that second local repo? Make sure to reproduce your changes in a dedicated branch, not on `master`, as I illustrated yesterday in http://stackoverflow.com/a/22420869/6309. – VonC Mar 16 '14 at 09:47
  • Sorry for delay but how to create second fork of GitHub repository? – Sławomir Rosiek Mar 21 '14 at 20:16
  • @SławomirRosiek I believe you cannot create a second fork with the same account: you would have to use a second GitHub account for that. Then you can manage different account for push/pull (http://stackoverflow.com/a/7925764/6309) – VonC Mar 21 '14 at 20:20
  • I've made second fork following this guide: http://adrianshort.org/2011/11/08/create-multiple-forks-of-a-github-repo/, but again I've received `not properly sorted` error during push – Sławomir Rosiek Mar 21 '14 at 21:05
  • @SławomirRosiek that means the issue is on the original repo. Maybe GitHub support can have a look at it? – VonC Mar 21 '14 at 21:45