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 8495373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:33:23+00:00 2026-06-10T23:33:23+00:00

I have a git repository online and I use, as many do, to keep

  • 0

I have a git repository online and I use, as many do, to keep track of my programs. It worked all fine with the usual procedure from the root of my directory’s tree:

git add . 
git commit
git push origin master

When one day I found a subdirectory in my tree have become green (on the git site) and was impossible to access. Now I know the green color is for a submodule (even if I have not understood what this mean) but I’d like it to be a real directory, one where I can view and download what’s there or examine modifications. The question is, how can I make this directory to become normal again, with all its subdirectory and file inside without touching the other directories inside the tree?

Thanks

  • 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-10T23:33:24+00:00Added an answer on June 10, 2026 at 11:33 pm

    The idea would be to:

    • clone your repo
    • git submodule update --init --recursive: see “How can I init/update git submodules in a remote?“
    • remove and add again your files from the submodule: see “un-submodule a git submodule“

    The last link shows you how to dereference a submodule, while, if you want, preserving the history of the commits done in said submodule (but merging them back to the main repo)

    Now if, when trying to init the submodule, you get the message:

    No submodule mapping found in .gitmodules for path '...'
    

    Check the second part of “Git – how to track untracked content?“: the “Replace It with Plain Content” section.

    The root cause is when you try to add a directory which is a git repo in itself within your main git repo work tree:

    The directory ‘nested repo‘ starts out as an independent Git repository.
    Usually such sub-repositories are ignored, but if you tell git add to explicitly add it, then it will create an gitlink entry that points to the sub-repository’s HEAD commit instead of adding the contents of the directory.
    It might be nice if git add would refuse to create such “semi-submodules”.

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

Sidebar

Related Questions

I keep all of my dotfiles in a git repository. This works out fine
I have git repository on bitbucket. I use it from Eclipse for a while,
I have a git repository that I'm trying to delete all files and folders
I have a git repository imported from subversion where users have names like H1234567
I have pulled git repository form github in my user folder and all files
I have a Git repository that is accessed from both Windows and OS X,
We have a git repository managed by gitosis under Ubuntu, which has worked well
I have a Git repository on my local machine that I cloned from my
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a
I have a git repository - including different tech. Android and iPhone. The folder

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.