Drafts & branches
An edit you save does not change the model at once. It collects in your personal draft, and it reaches the model when you commit the draft. Branches give a model more than one line of work, so a larger change can take shape beside main before it is merged back. The branch control at the right end of the bar at the top of the model’s pages shows which branch you are on: its name, such as v3, or only a branch icon while main is the model’s only branch and you are on it.
Your draft
Section titled “Your draft”A draft is your own set of changes to a model that you have not committed yet. Each time you save an edit, for example with Save changes on the element form, by renaming or moving an element in the model tree, or by saving a diagram, ModelDesk adds it to your draft as one step, and the draft chip counts the steps, for example Draft · 3 steps. A step is one save to your draft. When an agent works in your draft, a step is one batch of changes that can touch many elements, and the draft shows how many elements an agent’s steps touched. The model on your screen shows your draft: the model with your pending changes in it.
- A draft is personal. Only you see your draft. Other people who open the model see it without your pending changes until you commit them.
- A draft is kept on the server. Closing the tab or signing out loses nothing that was saved to your draft. The next time you open the model, your draft opens with it, and the model list marks the model with a Draft badge.
- You hold one draft per model. It belongs to the branch you were on when you added its first change.
You can undo and redo steps (Undo takes back one step), remove one, or discard the whole draft. See Work in a draft and commit.
Committing
Section titled “Committing”To commit is to land everything your draft holds on its branch as one commit, with an optional message that says what changed and why. The commit then appears in the model’s history with you as its author, and everyone who opens the model sees your changes. Your draft is empty again, and your next edit starts a new one.
A commit records the net effect of the changes in your draft: an element you saved three times counts as one update, and an element you created and then deleted again is not in it at all. So the history shows one entry per commit, not one per saved edit.
Before you commit, Review changes shows everything your draft changes at once, as a list or on the model’s diagrams. See Review your changes.
Branches
Section titled “Branches”Every model has a branch called main, its main line of work. You can create more. A branch is a separate, named line of a model: it starts as a copy of another branch and then changes on its own. Use one when a larger change should take shape without affecting main until it is ready, for example a new edition of a standard that others review before it lands.
- You work on one branch at a time. The name in the bar at the top of the model’s pages shows which one is open. Your draft belongs to that branch, so you commit or discard it before you switch.
- Merging brings one branch’s changes into another. A merge lands as one merge commit on the receiving branch, which records both branches it joined. Only committed changes are merged; what people still hold in their drafts stays there.
- A conflict stops a merge. When both branches changed the same element in ways that cannot be combined, nothing is merged until you choose which version to keep.
See Work with branches.
Changes made elsewhere
Section titled “Changes made elsewhere”Other people commit to a model while you work on it, and you may have the same model open in another tab. ModelDesk applies those changes to your open page as they land, marks what changed, and keeps your unsaved edits in place.
Commits on your branch are not mixed into your draft while it holds pending changes. Instead, the draft chip says the branch was updated, and you bring your draft up to date when it suits you. Committing does it for you first. See Follow changes made elsewhere.
What stays on main
Section titled “What stays on main”Some parts of ModelDesk always work from main as it is committed, without the changes in your draft:
- exporting and transforming the model, and downloading content bundles;
- the model’s Overview, the Based on section of the Model settings page, and the Mappings page;
- the links, rules and counts on the Semantic Lineage page, and the Export diagrams dialog;
- creating a model from yours with Map model or Duplicate model;
- named versions, which are always made from
main. A model that depends on yours usesmainor one of its versions.
Where one of these leaves the changes in your draft out, it says so, for example “Shows main. The 2 steps in your draft are not included.” Map model and Duplicate model offer Commit first. On a branch other than main, these places say that they show main, not the branch you are on.
The validation report and the Query page do follow what you see: they include the changes in your draft, and on another branch they work on that branch.
Some changes are saved directly to main rather than to your draft, and an open draft is then brought up to date with them: the Model settings page apart from its namespaces, alignment, dependencies and attribute templates, so metamodel extensions, base models and the References section; external dependencies and the dependencies of a metamodel extension; lineage links and rules, origin mapping rules and alignment working sets; resolving an unresolved reference; named versions; and the Metadata page. On a branch other than main these changes cannot be made, apart from named versions, the model’s name and access mode, and the Metadata page: they say “Changed on main only.”, most with Switch to main. While a model has branches other than main, its metamodel extensions cannot be changed.
Related pages
Section titled “Related pages”- Work in a draft and commit: make changes in your draft, undo, discard, and commit them.
- Review your changes: see everything your draft changes before you commit.
- Work with branches: create, switch, compare, merge, and delete branches.
- Follow changes made elsewhere: what happens when others commit while you work.
- Versioning & history: commits and named versions.