I have a directoryA
which contains sub directories which I created via git clone
I want to create a git repository for the directoryA
.
But when I do git add -A && git commit -m "w"
nothing gets committed.
Do I need to take a special care for dealing with git-cloned subdirectories
?
directoryA
is my special directory for collection of libraries I use for my project.
What you are creating are uninitialized submodules, and yes submodules require a bit of special handling to use them effectively.
Once the submodule is initialized, you will be able to commit the sub directory it lives in from the parent project.
Submodules go beyond basic git with a bit more of a learning curve, but once understood serve their purpose well and merge nicely with the rest of git.
What makes the handling of submodules special can be summed up in a few key concepts:
Here are a few links that were very helpful to me when I had the need to take the plunge into submodules, which has been quite helpful in keeping track of the various pieces of my projects.