开发者

git: recovering server/remote repository from backup

today i lost my remote repository due to a server crash. i installed a backup which was 2-3 hours old. unfortunately i made some pushed after the backup creation and now the master branch of my local is "out of sync" compared to the remote master branch. my local master is a couple of commits/pushed ahead of the remote master and now i do not know what to do. i can not push again, it says "! [remote rejected] master -> master (n/a (unpacker error))". pulling does not help either. is there a way to get them back "in sync" cleanly?

otherwise i would diff the two masters, clone the remote again and apply the patches and commit again. the biggest problem with that is that all my other developers need to do the same (because their master branches are out of sync as well) and we have a lot of unpushed local feature branches laying around.

any nice solution? if no开发者_开发问答t i have to rethink my backup process as well :)

regards, stefan


The "(unpacker error)" you get may indicate that your remote simply isn't working properly. If it were working properly, I would expect you to be able to push your local repo to the remote successfully.

Does pushing for another unrelated remote repository work? If you get the same error, it's probably a configuration problem on the remote machine, not anything to do with that specific repo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜