Microsoft Fabric Tip #13

Fabric deletes what you leave in an item folder

An item folder is the one carrying .platform, or the older metadata pair. Files inside it that are not part of the item definition go at the next commit; files outside any item folder stay.

An item folder carries one metadata file, or a pair

Commit a workspace to Git and you get a folder of items. A version 2 item is a folder carrying a .platform file, and a version 1 item is a folder carrying the older pair, item.metadata.json and item.config.json. Everything the item is made of sits under its definition folder. Finding the items in a clone is a search for those file names, with no API call and no workspace open.

What the commit does to everything else

Learn’s wording is that the commit deletes files inside the item folder that are not part of the item definition, and that unrelated files outside every item folder are left alone. Put a notes.md beside the definition folder of a notebook to remind yourself what it does, and the next commit takes it away. Leave the same file at the root of the workspace, outside every item folder, and it stays.

The rule is about the item definition rather than the folder, so a file the schema does not name is not part of it even when it sits inside definition.

The older pair and the newer file cannot both be there

A version 2 folder that also keeps item.metadata.json and item.config.json is one commit away from losing two of them, and that combination is worth finding before you commit rather than after.