I am in a situation where I am trying to convert an open source project to Git, and I have recently gained access to historical data for the project. I have already made modifications to the repo, though, so I want to add these early changes as git commits to the beginning of the tree of commits in Git. (Yes, I am aware that this will change the SHAs for later commits; this is acceptable.) The data is provided as successive snapshots of the working directory. I want to set it up so that the state of the working directory for the later commits is not affected (I don't want to merge the changes in).
For example, if initial commit
B adds files
b to the working directory, and my historical commit
A adds file
a, I want to make a new commit
B' parented from
A that adds file
b only. In both
B', the working directory looks the same, and any subsequent commits on top of
B can be safely rebased onto
Is it possible to do this in Git? If so, how?
Edit: Note that I need to modify the initial commit. The standard usage of
git commit appends a new commit as a child of the
HEAD commit, and so does not work for the initial commit, which has no parent.