I have read some of the other posts on stackoverflow and realize the problem, however, how do I fix this? I tried: git rm --cached client_folder
but i get the folllowing error msg: I have this same problem:
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.
how do I fix this? I tried: git rm --cached client_folder
but go the folllowing error msg:
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)
[edit] I ran git rm --cached -f client
and this is what i got:
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.
I tried again and now I am getting:
client % git rm --cached -f client
fatal: pathspec 'client' did not match any files
The last line is actually an indication to turn the -f
option on on your git rm
command :
git rm --cached -f client