Guides
Branch and merge data
Use a branch to prepare imports, test updates, or review proposed changes without changing your team's main line of work. Branches can also remain independent when you need separate datasets or experiments.
Start a proposal
Create a branch from main in the intended workspace:
legra graph branch create review --from main
Check the available branches:
legra graph branch list
Names such as review are convenient for daily work. Use a full branch
identifier when an integration needs to refer to a specific branch.
Make changes on that branch
For an update saved in proposal.ru:
legra graph update proposal.ru --branch review
For an RDF upload, select the upload destination explicitly:
legra graph upload proposal.ttl --graph https://example.org/proposal --target-branch review
Review the result
Run the same query against each branch to compare the outcome:
legra graph query review.rq --branch review
legra graph query review.rq --branch main
Check the changed facts and any validation results before approving the proposal. A successful query alone does not establish that the change meets your team's requirements.
Merge accepted work
legra graph update 'MERGE BRANCH "review" INTO "main"'
The source is review; the destination is main. If a merge reports a
conflict or a validation failure, resolve the reported issue and review the
proposal again before retrying.
Finish
After confirming the result on main, remove the review branch if it is no
longer needed:
legra graph branch delete review
Keep long-lived branches when they serve an ongoing purpose. For a complete worked example, follow Review data changes.