I'm a newbie with respect to git, but not to version control in general — I've been using CVS and Subversion for years. I've read both the Progit and O'Reilly (Version Control with Git) books, and I think I've got a good grasp of the general concepts. I'm trying to set up git for an existing project, and I'm running into some issues that I need some guidance on.
Background: The project involves an embedded SoC chip running Linux. A third party did the initial development of the application, and they set up four separate git repositories to hold the code:
- One for the chip vendor's SDK
- One for the Linux kernel
- One for a custom API layer created by the third party
- One for the actual application code.
In addition to this, there are some additional files at the top level that are not (yet) under version control at all.
The first issue is that I'd like to combine all of this into a single git repository. Ultimately, a bare clone of this new top-level repository will be hosted on our own cloud service. I've looked at a lot of material on the net (starting from here) regarding submodule vs. subtree, but I'm still not sure which would be the best fit for my situation. We want to be able to continue to track any changes in the four repositories that may occur on the third party's server, but we need to maintain our own history of local changes as well. Any suggestions?
The second issue is that the local developers have not been doing version control at all, except to take snapshots of the entire project from time to time. To further muddy the waters, the order in which the various snapshots were taken is not clearly documented. Keep in mind that each of these snapshots is of a tree of more than 200K files and more than 6GB of data. However, I'm sure that 99.99% of the files are identical across snapshots. What is the best way to find the differences among these snapshots and eventually figure out the correct order in which to put them?
My current thought is to take the one that I think is the oldest, and commit that into git first. Then create a separate branch for each of the others. The git diff tools should then allow me to efficiently find the differences and figure out what order they should be merged into the master branch. Thoughts?