I have two git repositories which I need to synchronize without having direct network connection between them.
I cannot use git fetch
or git push
as-is because both of them require that direct connection. Patchfiles also don't seem to be a viable option because they lose commit tree structure. Although, I've discovered that git uses git pack-objects
and git unpack-objects
under the hood to generate and consume pack-files.
Can I somehow make Git generate that packfile for me (given I provide commit range I want) and then consume it? Or maybe there's some way to preserve structure in patches? Or maybe there's some other approach?
Thanks