Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9052371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:09:11+00:00 2026-06-16T13:09:11+00:00

I have a directoryA which contains sub directories which I created via git clone

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:09:12+00:00Added an answer on June 16, 2026 at 1:09 pm

    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:

    • Submodules must be initialized before the parent repository knows about them.
    • Submodules must be cloned, updated and commited specifically, although there are command options that automate some of this.
    • Submodules are full repositories with a single commit checked out; as such they are headless and a branch must be created before any changes made can be commited.
    • Any changes to submodules should be checked in first, before the changes to the parent repository. The parent update of the submodule is actually an updating of which of the submodules commits the parent knows about.

    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.

    Git Tools – SubModules

    Git Submodules: Adding, Using, Removing, Updating

    Understanding Git Submodules

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a directory which contains multiple sub-directories with mov and jpg files. /dir/
I have a directory called users which contains sub directories for each user. E.g.
I have few top level directory which contains sub directories e.g www which are
I have a image folder which contains sub directory for each album of images
I have a JTree which contains file/directory, i want to get a list which
I have a directory Dir in which I have about 30 sub-directories. From these
I have a git directory which contains the a whole bunch of files and
I have a Git repository that contains a bunch of top-level maven projects (each
If, for example, I have a directory which contains the following files: Test-20120626-1023.txt Test-20120626-0710.txt
I have a directory listing for which I want to retrieve the filenames and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.