Git problems with git push --all

前端 未结 4 1446
耶瑟儿~
耶瑟儿~ 2021-01-02 00:19

I have a base repository that lives on a UNC \\machine\\share ....etc. I have a local clone that I work on in the master branch and occasionally merge over to the \"stable\

相关标签:
4条回答
  • 2021-01-02 00:43

    Thanks, git fsck --full reported "dangling commit"

    so git prune blew away the offending stuff and I got to type it in again. Btu at least the trees are all resolved..

    Thanks for the help.

    0 讨论(0)
  • 2021-01-02 00:44

    do a git fsck --full on the remote repo. The remote repo may have become corrupt. Clone another one from the remote. Replace the original remote with this one. You should now be able to push again. Something has happened to the remote repo. Nothing you're doing is out of line with regular use.

    0 讨论(0)
  • 2021-01-02 00:48

    For the record, I believe the root cause of this problem was the difference in capitalisation between the local and remote branch names, and the case-insensitive nature of the Windows share that hosted the remote repository.

    We just encountered this exact same error and were able to resolve the problem simply by renaming the local branch to match the capitalisation of the existing remote branch.

    See here how to rename a local branch.

    In Windows, due to capitalization, you may need to take two steps:

    git branch -m example foo
    git branch -m foo EXAMPLE
    
    0 讨论(0)
  • 2021-01-02 00:53

    An error I found was trying to push a branch develop to a repository that had branches named: develop/1148 and develop/693. git isn't ok with this (I forget why), so deleting those branches (if possible) fixed this hangup.

    0 讨论(0)
提交回复
热议问题