tags:

views:

22

answers:

1

I have a directory that looks like this:

ProjectFolder/
  + project_file

  + project_file_2

  + project_folder/
      + another_file

  * my_stuff/       <= add to repo
      * foo         <= add to repo
      * bar         <= add to repo

  * my_file         <= add to repo
  * my_other_file   <= add to repo

ProjectFolder is a piece of software that I did no write, nor is it a git repository. For what it's worth, it's vBulletin.

Inside the main folder, I have some project extensions/modules/etc. The location of these files is mandated by the outer project. Luckily, 95% of the files I care about stem from the ProjectFolder root. (Note the files marked with * above)

Is there a way I can easily add the *-marked files to a git repo?

The issue I see here is that git won't be able to distinguish my extensions from the outer project.

Extra: When updating the outer project, it would be nice to simply reclone the git repo to reinstall all the extensions in my git repo.

+1  A: 

Repo within a repo means generally submodule.

If you can make ProjectFolder a "parent repo" and each of your subdirectory a submodule, you would achieve the kind of organization you are after.

Each subrepo could be changed independently one from another.
Even if ProjectFolder is not a repository, nothing prevent you to make one in it (git init .), and you could add in it directly my_file and my_other_file, plus the reference to the other subdirectories declared as repo of their own.

VonC
@VonC, the outer project is not a git repository. Updates for the ParentProject are not version controlled. The come in the form of a `.zip` file.
macek
@macek, but if you make a repo from `ParentProject`, you can then unzip directly in it and see in the various submodules the changes introduced by that zip: you would then commit those changes in each submodules before committing in the Parent repo (`ParentProject` folder)
VonC