Git and nasty “error: cannot lock existing info/refs fatal”

后端 未结 24 1441
礼貌的吻别
礼貌的吻别 2020-11-30 15:58

After cloning from remote git repository (at bettercodes) I made some changes, commited and tried to push:

git push origin master

Errors

24条回答
  •  自闭症患者
    2020-11-30 16:47

    In my case, it was connected with the branch name that I had already created.

    To fix the issue I've created a branch with the name that for certain shouldn't exist, like:

    git checkout -b some_unknown_branch
    

    Then I've cleared all my other branches(not active) because they were just unnecessary garbage.

    git branch | grep -v \* | grep -v master | xargs git branch -D
    

    and then renamed my current branch with the name that I've intended, like:

    git checkout -m my_desired_branch_name
    

提交回复
热议问题