Reverse Branch Cloning
Reverse branch clonings is useful when the basic clone command can't be used, such as when the source TerminusDB instance is in a location that a cloud instance can't connect to. Another reason could be that just a branch should be moved between two data products and not the entire data product.
In most circumstances, the clone
command can be used to move a data product branch from a cloud TerminusDB instance to a localhost instance, or from a cloud instance to another cloud instance or team.
How to reverse clone a data product branch from a localhost instance to a cloud instance, is described here. The baseic procedure goes like this:
- If the cloud data product does not exist, create a new empty one
- Setup a remote in the localhost data product from the cloud instance
- Fetch the remote data product from the cloud instance
- Push the relevant branch, such as
main
from localhost to the remote data productmain
branch - Move any additional branches that should be moved
- Copy title, description and other attributes of the data product to the cloud version.
Read more about git-for-data for more information on how to use TerminusDB and git-for-data.