# Publishing to Git

Review file changes and publish a commit or pull request.

## Saving is not publishing

Drafts stay in your Content Space until you explicitly publish. A saved draft does not modify your repository. Published content is written as normal repository files.

The same applies to navigation placement: saving it keeps the change in Prosefly until you publish the reviewed files.

## Review the diff

Open publication review from the editor. Check every affected file, including navigation configuration when present. Confirm the repository, target branch, file paths, and publication mode.

The review suggests a title and Markdown description. You can edit them before submission. New changes made while publication is running are not silently included in that reviewed snapshot.

<figure>
  <img
    src="/images/screenshots/publishing/commit-review.png"
    alt="Commit mode: review the file diff, confirm the repository and target branch, then choose Sync to Git."
    width="2880"
    height="1620"
    loading="lazy"
  />
  <figcaption>
    Commit mode: review the file diff, confirm the repository and target branch, then
    choose Sync to Git.
  </figcaption>
</figure>

## Review content and navigation together

When a document has supported navigation changes, publication review includes the affected files: document frontmatter used for ordering and native navigation configuration where applicable. Check every diff under **Changes**, and use **Files** to inspect the affected file list.

Confirm that the navigation diff places the page where you intended. If it needs another adjustment, choose **Continue editing navigation**, update the placement, and open review again before publishing.

### Starlight

This Starlight review includes two files. `css-and-tailwind.mdx` gains `sidebar.order: 2`, which changes the order of an automatically generated page. `astro.config.mjs` contains a manual sidebar change. Review both diffs before creating the pull request.

<figure>
  <img
    src="/images/screenshots/starlight/navigation-review.png"
    alt="Starlight publication review with sidebar.order: 2 added to css-and-tailwind.mdx and a manual sidebar change in astro.config.mjs, with two changed files."
    width="2880"
    height="1620"
    loading="lazy"
    decoding="async"
  />
  <figcaption>
    Review automatic page ordering and manual sidebar configuration changes in the same
    publication.
  </figcaption>
</figure>

### Lotus and Dahlia

<figure>
  <img
    src="/images/screenshots/prosefly/navigation-review.png"
    alt="Publication review showing a troubleshooting.mdx content diff and a theme.config.json navigation reorder, with two changed files and a Create pull request action."
    width="3154"
    height="1859"
    loading="lazy"
  />
  <figcaption>
    This Prosefly docsNav example reviews troubleshooting.mdx and theme.config.json
    together. The navigation diff moves connect-github after content-ownership in the
    existing group, and the pull request includes both changed files.
    <br />
    <a
      href="/images/screenshots/prosefly/navigation-review.png"
      target="_blank"
      rel="noopener noreferrer"
    >
      View full-size screenshot
    </a>
  </figcaption>
</figure>

### Fumadocs

For Fumadocs, review the affected `meta.json` page lists alongside the MDX documents.

## Choose the publication workflow

- **Commit:** write the reviewed changes to the configured target branch.
- **Pull request:** create a branch and GitHub PR containing the reviewed changes. The target branch is updated when that PR is merged.

Open **Space settings → Publishing** to choose the publication mode. It applies to all entries in that Content Space. GitHub App write permissions and repository branch protections must allow the selected workflow.

<figure>
  <img
    src="/images/screenshots/publishing/settings.png"
    alt="The Publishing tab in Space settings, with Commit and Pull request options in the Publish mode menu."
    width="2880"
    height="1620"
    loading="lazy"
  />
  <figcaption>
    Choose Commit or Pull request in Space settings → Publishing. You can also set message
    templates here; leave them empty to use the automatic text.
  </figcaption>
</figure>

<figure>
  <video
    src="https://media.prosefly.com/_video/prosefly-pull-request.mp4"
    width="1920"
    height="1080"
  ></video>
  <figcaption>From reviewing the diff to a merged pull request.</figcaption>
</figure>

## Follow the result

Publish history links to the GitHub result and shows the submitter, target, and status. A PR initially awaits merge. Refresh history to check unresolved PRs; this is not continuous background polling.

Git publication does not deploy a website. Your site’s existing build and hosting workflow handles deployment after changes reach the expected branch.

<figure>
  <img
    src="/images/screenshots/publishing/history.png"
    alt="Publish history links each publication to its GitHub result and shows the latest status."
    width="2800"
    height="1858"
    loading="lazy"
  />
  <figcaption>
    Publish history links each publication to its GitHub result and shows the latest
    status.
  </figcaption>
</figure>

## Handle an external change

If the Git base changed while you had a draft, compare the original base, current Git content, and your draft. Resolve the conflict before publishing again. Prosefly does not force away concurrent repository changes or automatically merge conflicting documents.

Scan after external repository changes to refresh the content index. Publishing and scanning are distinct operations.

## Include Public files and translations

When a document references a new, unpublished [Public image](/docs/public-files/), review includes that image as a required file. Check the image and document together. You can also add other Public drafts from the same Content Space to the batch.

Only supported static image references are detected. Dynamic MDX expressions are not evaluated, and JSON/YAML Resource strings do not automatically include image drafts. Publish those images separately before content that uses them.

Related [language drafts](/docs/languages-and-translation/) can be reviewed together. Translation does not publish automatically: inspect the files and confirm which versions belong in this publication.
