我已经阅读了一些关于堆栈溢出的其他文章,并意识到了这个问题,但是,如何解决这个问题呢?我试过:git rm --cached client_folder,但是我得到了错误信息:我也遇到了同样的问题:
Reinitialized existing Git repository in /Users/user/Desktop/final-8/.git/
User@User final-8 % git add client
warning: adding embedded git repository: client
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> client
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached client
hint:
hint: See "git help submodule" for more information.我该怎么解决这个问题?我试过了:git rm --cached client_folder,但是去看下面的错误消息:
git rm --cached client
error: the following file has staged content different from both the
file and the HEAD:
client
(use -f to force removal)编辑我运行了git rm --cached -f client,这就是我得到的:
User final-8 % git rm --cached -f client
**rm 'client'**
User final-8 % git init
Reinitialized existing Git repository in /Users//Desktop/final-8/.git/
User final-8 % git add client
warning: adding embedded git repository: client
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. 我又试了一次,现在我得到了:
client % git rm --cached -f client
fatal: pathspec 'client' did not match any files发布于 2020-12-03 07:30:41
最后一行实际上是在您的-f命令上打开git rm选项的指示:
git rm --cached -f clienthttps://stackoverflow.com/questions/65121516
复制相似问题