上传本地项目到gitHub时,遇到这个问题 git modified content, untracked content
modified: xxx(modified content, untracked content)
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> xxxx/xxx
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached xxxx/xxxx
hint:
hint: See "git help submodule" for more information.
原因是自己用Xcode创建的项目,Xcode默认给创建了本地仓库,终端cd到报冲突的文件夹,git branch -a一看果然后在master分支,仓库冲突了吧。
解决办法是将本地冲突文件夹删除,添加新文件夹,将冲突文件夹中内容移到新建文件下再次上传。
上传本地项目到GitHub时,出现git modified content和untracked content问题,原因是用Xcode创建项目时,Xcode默认创建了本地仓库,导致仓库冲突。解决办法是删除本地冲突文件夹,添加新文件夹,将冲突文件夹内容移到新建文件夹下再次上传。

517

被折叠的 条评论
为什么被折叠?



