How to revert a Git Submodule pointer to the commit stored in the containing repository?

前端 未结 7 1148
感动是毒
感动是毒 2021-01-29 22:44

I have a git submodule in my main git repo. As I understand it, the main repo stores a SHA value (somewhere...), pointing to the specific commit of the submodule that it is \"li

7条回答
  •  花落未央
    2021-01-29 23:16

    The answer here somehow didn't solve my specific issue with the submodule so in case it happens to you too, try the following...

     git submodule foreach git reset --hard
    

    https://kalyanchakravarthy.net/blog/git-discard-submodule-changes/

提交回复
热议问题