Initial push to GitHub Missing Sub Directory

你说的曾经没有我的故事 提交于 2019-12-06 16:21:51
VonC

We had .git files in both sub directories but removed them prior to making this new combined repository.

It is not enough: you need to remove (untrack) the gitlink (folder name of the two subdirectories, viewed as a special entry in the index of the parent repo)

 git rm --cached subfolder1
 git rm --cached subfolder2

 git commit -m "remove gitlinks"

Then you can add and commit (provided the nested .git/ folders are indeed gone)

git add .
git commit -m "add two subfolders"
git push 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!