版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
之前不知道自己怎么作的,github的.io库就是不好用,经常出现404错误,而且每次push都不成功,还会收到邮件:
在网上找了好久,今天花了1个小时,终于解决了。
之前库中的文件夹是这样的:
可以看到,文件夹全是灰色的。网上说原因是因为,文件夹中包含其他仓库,所以需要删除其中的.git 文件。
但是我删除了之后,还是不行。
所以,就直接把文件夹删掉了。
git上如何删除一个文件夹?
如果直接git rm本地的文件夹也被删除,应该删缓冲。
git rm -r --cached some-directory
git commit -m "Remove the now ignored directory some-directory"
git push -u origin master
当出现no changes added to commit时如何正确使用git提交命令
对于这个问题,最好的解决方法就是按如下步骤:
1.到根目录下:git add . ;(“.”是必须要的)
2.git commit -m “some word”
3.git push -u origin master
如果你只修改了一个文件,也可以在第一步中进入你修改了的目录下,然后将这个文件进行git add 文件名,接着进行下边的2,3步骤。。。
添加子模块
在子模块的目录下,git submodule init
然后,git submodule update
然后,git commit -m “some word”
最后,git push -u origin master
In the submodule’s directory, run git submodule init, then git submodule update.
Commit and push your changes to trigger another build on the server.