See it as a diagram
Everything below, as a diagram you can edit. Describe yours and see it in seconds.
No account needed · Editable canvas, not a picture
What each choice actually does at sync time
A branch-tracking diagram resolves the head of that branch on every sync. When the head has moved, the sync looks at what moved. When it has not, the sync stops immediately, which is why a quiet week costs nothing.
A tag-tracking diagram resolves the same commit forever, because that is what a tag is. Annotated and signed tags are dereferenced to the commit they wrap rather than to the tag object, each host in its own dialect: on GitHub the tag object is fetched and followed one step, on Azure DevOps the refs listing is called with peelTags=true, on GitLab the tags endpoint already answers with the commit. The tree that gets read is therefore the tree that was tagged. Practically, a tag diagram generates once and then answers unchanged on every later sync, which makes it a record rather than a maintenance obligation.
Ref names with slashes are fine on all three hosts, so release/2026.08 or feature/warehouse-migration work as tracked refs. The picker pulls three pages of a hundred from the provider for each kind, so up to three hundred branches and three hundred tags are offered and the choice is made from what exists rather than typed from memory. Before any request is made the name is checked: a ref containing whitespace, a control character, a :// sequence, a .. traversal, a leading or trailing slash, or an empty path segment is refused outright.
Platform (main) branch main resyncs, skips when nothing structural moved Platform (v3.2.0) tag v3.2.0 generated once, unchanged thereafter Platform (warehouse) branch feature/warehouse-migration redraws as the branch evolves
One connection, several diagrams
A connection is the repository plus, for a private repo, its token. Diagrams hang off it one per ref, and there is no limit of one. The common arrangement is a living diagram on main plus a frozen one per release tag, which costs one extra generation at release time and nothing afterwards.
The second arrangement worth knowing is the long-lived branch. During a migration, a feature branch is where the new architecture actually exists, and a diagram tracking that branch turns the review into a picture comparison instead of a diff read. When the branch merges, the main diagram catches up on its own and the branch diagram can be unlinked.
On the first sync of any diagram, Datadef reads the repository and then asks what the diagram should show, with a recommendation derived from the file counts it found. The recommendation is arithmetic, not a model call: if the data models, SQL, schemas, and API definitions outnumber the infrastructure, container, and CI files, it proposes the content view, otherwise the architecture one. Answering both creates a sibling diagram on the same ref committed to the other view, which is how a repo ends up with one diagram of the system around the code and one of what the code does.
A Terraform-dominant repository is the exception: it skips the question entirely, because there is one right view of a directory of .tf files and asking about it would be a formality.
Which one to use, by situation
Use main, or whatever your default branch is called, for the diagram everyone links to. This is the one that belongs in the README, in the onboarding doc, and in the wiki page people search for. Its value comes from being current, so daily sync stays on.
Use a release tag when the diagram has to still be true later: a compliance artifact, an architecture record attached to a release, the picture a customer received with a delivery. A tag diagram cannot drift, because the commit under it cannot move.
Use a feature branch for a change big enough to argue about. Once the argument is settled and the branch is merged, delete the diagram or unlink it, the same way you delete the branch.
The related question of how often the main diagram should regenerate is covered in how often should architecture diagrams be updated.
Frozen by intent, not by neglect
FAQ
Can one repository connection back more than one diagram?
Does a diagram tracking a tag ever regenerate?
Are annotated or signed tags handled correctly?
Can I track a branch whose name contains slashes?
What happens to the branch diagram after the branch is merged and deleted?