How can I recover my Git repository for a “missing tree” error?

前端 未结 14 2195
孤独总比滥情好
孤独总比滥情好 2020-12-08 02:23

We are using Gerrit for our Git repository. On a project that has been active for several months, we are suddenly unable to push any changes. When we execute git pus

14条回答
  •  感情败类
    2020-12-08 03:03

    I am getting this same error on my tortiuse git. I finally get the root cause of this error.

    The steps which causes this error;

    • Create a new branch on head.
    • Do some modifications on new branchs
    • Somebody also make modifications on head branch
    • Try to push your branch

    This error will occur if a local branch is created and not pushed until some modifications ara made in head branch. This is a normal thing, since remote head branch do not know anything about your local branch until a push action.

    To solve this error, switch the head branch get a full pull action. Then switch your branch and try a push.

提交回复
热议问题