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

  • SEARCH
  • Home
  • 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 7873461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:31:18+00:00 2026-06-03T02:31:18+00:00

I have the following folder structure: foo/ foo/bar foo/baz foo/bee I created a git

  • 0

I have the following folder structure:

foo/
foo/bar
foo/baz
foo/bee

I created a git repository on foo/bar/.git.

I realized later on that I needed to include all the other directories in foo in a git repository, so I created a git repository on foo/.git.

foo/.git
foo/bar/.git
foo/baz
foo/bee

I could just delete foo/bar/.git but I want to be able to keep the history of that git repository but within foo/.git instead of foo/bar/.git.

I was trying to read on submodules but if I understand correctly it is a way to integrate a version of an existing repository as a subtree of your own repository.

I’m not entirely sure this is what I need. I don’t need to keep foo/bar/.git. I want the foo/.git to be my main repository. I just wanted to know if there was a way to keep or integrate the history of the foo/bar/.git within foo/.git so I could remove foo/bar/.git.

  • 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-03T02:31:19+00:00Added an answer on June 3, 2026 at 2:31 am

    Why not create a bar directory in foo/bar, git mv everything into foo/bar/bar, then move (without involving git) foo/bar/.git to .git and the contents of foo/bar/bar up to foo/bar finally removing the now empty foo/bar/bar subfolder.

    Then you can add the rest of the subdirectories to the git repository which is now in foo.

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

Sidebar

Related Questions

Multilevel relative import I have following folder structure top\ __init__.py util\ __init__.py utiltest.py foo\
I have a folder structure like follows. -FOO -BAG Rose.TXT -BAR JaCk.txt I need
Suppose I have the following (desired) folder structure: *CommonProject *Project#1 ----> CommonProject(link) *Project#2 ---->
I have the following directory structure of a project: Folder project in Eclipse: --folder
I have the following code that's looping through files in a folder and doing
I have tried the following but it seems the folder gets created on the
I have the following file structure (XML files 'index.xml' in nested folders): index.xml foo/index.xml
I have following folder structure: ProjectFolder/images/some images In the same folder ProjectFolder/WEB-INF/classes/com/xyz/here is java
I have got following folder structure for my domain (domain.com): /data/images (it´s subdomain name,
Trying to get a simple test perl script working. Have the following files/folder structure

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.