Hi PeterR,

In short, "git submodule" is one git repository (submodule) inside another 
git repository (superproject). For more info you may check "7.11 Git Tools 
- Submodules" <https://git-scm.com/book/en/v2/Git-Tools-Submodules>, 
gitsubmodules[7] <https://git-scm.com/docs/gitsubmodules> and 
git-submodule[1] <https://git-scm.com/docs/git-submodule>.

Do you have any ".git" file or folder inside your "ModelCtrl" directory?

What does "git status" output?


On Sunday, October 29, 2017 at 9:32:00 PM UTC+1, pro...@ucsd.edu wrote:
> By mistake I did “git add my_directory”, without adding any files in the 
> directory.
> When I tried git-adding a file in the directory,, git complains it’s a 
> fatal error:
> fatal: Pathspec 'modelside/ModelCtrl/Main2.c' is in submodule 
> 'modelside/ModelCtrl'
> In this message, “ModelCtrl” is the directory in question, and Main2.c is 
> a file to be added.
> How can I remove "my_directory" from the index? And add the files in the 
> directory to the index? 
> What is a submodule ?  
> Thanks for any advice..
> PeterR

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to