-1
\$\begingroup\$

I'm trying to set up version control for my group, but I'm having trouble getting GitHub to work (I'm brand new to it, and version control in general). It keeps saying "Could not commit sub-modules: [project] Add them as sub-modules from Git Shell or remove their .git folders to add the as directory's instead." I tried the latter, but not the former (I don't know how to).

If it helps I"m working with Unity, and trying to do it like that. How do I make this work?

\$\endgroup\$
1
\$\begingroup\$

Your problem is that you're trying to include a git repository within your git repository. Git has a functionality called submodules that serves this purpose, it basically allows you to specify a remote and a commit for each submodule that git will then clone and checkout for you. I've personally found the submodule feature of git to be rather cryptic and sometimes counter-intuitive, if you can avoid including the other repo in your repo I would go that route.

If not, take a look at this page. Instead of copying the submodule into your repository, you should be calling a git submodule add <remote>. Now the submodule will get added to your working directory and be kept track of within the parent repository.

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.