I have two rooms in which I maintain some source code using git, "dev", where most of the development takes place, and the "deployment" of the room in which we actually use the software. Inevitably, some changes occur in the deployment room. I would like both rooms to share the same story in git.
Limitations:
- For security reasons, the two rooms are not connected to the network.
- Only text files (human-readable) can leave the deployment room.
Moving changes to the deployment room is done using git bundle and tracking the last commit we moved to the deployment room. Moving changes from a room is more difficult due to the limited text only.
Purpose: Moving back and forth between my two unconnected rooms, as if git pull , ie , identical SHA1 hashes in both rooms happened.
Still:
I tried git format-patch push the changes from the deployment back to dev, but this does not record merges and therefore requires creating a different set of patches for each adjacent set of changes along with some record on how to reproduce the exact merge that happened between them. There is some discussion on how to make diff for merge commands , but this does not seem to reflect the actual pedigree, but only the changes. It seems that the fixes may not be rich enough to provide the necessary information.
Some script text bindings can be used to convert the package to an unencrypted and readable (ish) format (and then back after loading), but I have not found any evidence that such a script exists.
Perhaps it would be possible to write a script to move the story from some common ancestor to the newest commit, and either a) make a patch, or b) recreate the merging of some well-known links.
Fallback: I could always crush the commits leaving the deployment room into one raw patch and break the history, but then further downloads from dev-> deploy would break the existing working copies. Not ideal.
Update: I believe that git fast-export can do what I need, although in most examples it works on entire repositories and not on partial histories like git bundle . I have a working example of toys in which I can export a partial story to an obsolete clone, but I need to manually edit the output with quick export to add from <sha1> to the first commit. Without this modification, the import creates different sha1s and then complains about Not updating refs/heads/master (new tip <hash> does not contain <master hash>) .
Update2: My git fast-export solution works, but it has a bandwidth problem as it works by providing completely new files, and not different from previous files. This is unacceptable since I really have to read all these extra lines.
source share