Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/guides/best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ for interactive elements](../guides/interactivity.md).
Write cells whose outputs and behavior are the same
when given the same inputs (references); such cells are called idempotent. This
will help you avoid bugs and cache expensive intermediate computations.

**Choose what to track in Git.** Commit your notebook's `.py` file and any
files it needs to run. You can ignore the entire `__marimo__/` directory if
you don't need to share anything in it. Ignoring it doesn't stop marimo from
reading or writing files there locally.

To share selected files, replace `__marimo__/` in your `.gitignore` with the
rule below. It ignores [persistent caches](../api/caching.md) at any depth.

**/__marimo__/cache/

Add `**/__marimo__/session/` if you don't want to share saved outputs. To show
outputs in [static molab previews of notebooks hosted on GitHub](publishing/github.md),
leave that rule out and commit the [session JSON file](exporting/sessions.md).
Review the outputs for sensitive data before committing. You can also commit
assets such as [thumbnails](publishing/thumbnails.md) and any HTML or
`.ipynb` exports you want to share.
Comment on lines +77 to +93

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best practices guide contains best practices for writing marimo notebooks, and this section isn't about writing a notebook.

Can you instead add an entry to the FAQ?

Additionally, this sentence is tautological: You can ignore the entire __marimo__/ directory if
you don't need to share anything in it.