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.