原文地址

简要:直接把github上的仓库删除重建,本地的仓库也删除重建,再重新上传就OK了

最近想整理一下工作室官网的东西,那是一个用github pages写的网站,在上传一些post文章的时候,突然给我发邮件说有错误:

The page build failed with the following error:

The submodule 52FeidianStudio.github.io was not properly initialized with a .gitmodules file. For more information, see https://help.github.com/articles/page-build-failed-missing-submodule.

If you have any questions you can contact us by replying to this email.

然后点进去链接,提示“Page build failed: Missing submodule”,之前都没有遇到过这样的问题,于是习惯性地找到了度娘,但是都是一些stackoverflow的回答,本来就对git一知半解,突然要看英文的结局办法,虽然按照他们说的方法做了,但是收效甚微。然后在学长群里问也没有人回答,估计是一个很高级的问题。

但是并没有人回答我。。。。很是沮丧,最后在一片博客里看到他也遇到过类似的问题,但是我按照他的解决方案并没有解决问题。最后看到他说他的解决过程就是直接邮件github。突然感觉我为什么就不能这样呢。于是写了一封邮件,很开心的是,github的工作人员回复了我,并给我发了一个链接,大概的意思就是让我在github上重新建仓库之类的。但是我之前就试过,就是把原先在github上的repository删除,并重新建立了一个同样的repository,然后上传,但是并不奏效,然后我又询问具体的。很高兴地是,github的工作人员又给了我很详细的回答:
  • Make a backup of the content locally
  • Delete the repository from GitHub
  • Delete the repository locally
  • Recreate the repository, ensuring that you don't include the repository within the repository locally, which is what you did previously
  • Push it to GitHub

最后按照他的方法解决了问题,好感谢他。我问他这个问题的原因,他是如下解释的:

t you have made a copy of the repository directory within the repository directory

我并不是很理解,不过很开心问题解决了。

转载于:https://www.cnblogs.com/weloveshare/p/5823964.html

Logo

免费领 150 小时云算力,进群参与显卡、AI PC 幸运抽奖

更多推荐