> ## Documentation Index
> Fetch the complete documentation index at: https://learn.mintlify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow overview

> The practical loop from making a change to seeing it live on your documentation site.

export const Quiz = ({question, answers, correctFeedback, incorrectFeedback}) => {
  const [selected, setSelected] = React.useState(null);
  const [checked, setChecked] = React.useState(false);
  const quizId = React.useId();
  const isCorrect = checked && answers[selected]?.correct;
  const reset = () => {
    setSelected(null);
    setChecked(false);
  };
  return <div className={"quiz-container" + (checked ? " quiz-checked" : "")}>
      <Badge color="green">Quiz</Badge>
      <p className="quiz-question" id={quizId + "-question"}>{question}</p>
      <div className="quiz-options" role="radiogroup" aria-labelledby={quizId + "-question"} aria-disabled={checked}>
        {answers.map((answer, i) => <label key={i} className={["quiz-option", !checked && selected === i ? "quiz-option-selected" : "", checked && answer.correct ? "quiz-option-correct" : "", checked && selected === i && !answer.correct ? "quiz-option-incorrect" : ""].filter(Boolean).join(" ")}>
            <input type="radio" name={"quiz-" + quizId} checked={selected === i} onChange={() => !checked && setSelected(i)} disabled={checked} />
            <span className="quiz-radio" />
            <span className="quiz-option-label">{answer.text}</span>
          </label>)}
      </div>
      {checked && <div className={"quiz-feedback " + (isCorrect ? "quiz-feedback-correct" : "quiz-feedback-incorrect")} role="status" aria-live="polite" aria-atomic="true">
          <span className="quiz-feedback-icon">{isCorrect ? "✓" : "✗"}</span>
          {isCorrect ? correctFeedback : incorrectFeedback}
        </div>}
      <div className="quiz-actions">
        {!checked ? <button className="quiz-btn quiz-btn-check" type="button" onClick={() => selected !== null && setChecked(true)} disabled={selected === null}>
            Check answer
          </button> : <button className="quiz-btn quiz-btn-reset" type="button" onClick={reset}>
            Try again
          </button>}
      </div>
    </div>;
};

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/WrK6AX8gcrQ" title="Workflow overview" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

Understanding Git conceptually is one thing. Knowing what to do when you sit down to update your docs is another. This lesson walks through the complete workflow from start to finish, using both the web editor and the CLI.

## Two ways to work

Mintlify gives you two ways to edit your documentation, and they both use Git under the hood.

**The web editor** abstracts Git almost entirely. You open a page, make changes, and publish. Mintlify handles branching and committing behind the scenes. No terminal required and you can edit right in your browser.

**Local editing with the CLI** lets you use whichever text editor you prefer, generate a local preview via the CLI command `mint dev`, and use Git however you like.

Most documentation teams end up using both.

## The web editor workflow

<Steps>
  <Step title="Open a page in the editor">
    Open the editor on [dashboard.mintlify.com](https://dashboard.mintlify.com) and select the page you want to edit.
  </Step>

  <Step title="Make your changes">
    Edit the page content using the visual editor or switch to Markdown mode for direct MDX editing. Changes are saved automatically as you work.
  </Step>

  <Step title="Publish">
    Click **Publish**. Mintlify creates a branch, commits your changes, and opens a pull request in one step. You'll see a preview link in the PR so you can verify the changes before merging.
  </Step>

  <Step title="Merge">
    Review the preview, then merge the pull request. Your changes go live.
  </Step>
</Steps>

## The local CLI workflow

<Steps>
  <Step title="Pull the latest changes">
    Before starting any new work, make sure your local copy is up to date:

    ```bash theme={null}
    git pull origin main
    ```
  </Step>

  <Step title="Create a branch">
    Give your branch a name that describes the work:

    ```bash theme={null}
    git checkout -b update-authentication-guide
    ```
  </Step>

  <Step title="Start the local preview">
    Run Mintlify's development server to see your changes in real time:

    ```bash theme={null}
    mint dev
    ```

    Your docs site is now running locally at `http://localhost:3000`. Every change you save appears immediately.
  </Step>

  <Step title="Make your changes">
    Edit MDX files in your text editor. The local preview updates as you save.
  </Step>

  <Step title="Commit your changes">
    When you're ready to save a snapshot:

    ```bash theme={null}
    git add .
    git commit -m "Update authentication guide with new token format"
    ```

    Commit as often as makes sense. Each commit should represent a coherent unit of work.
  </Step>

  <Step title="Push and open a pull request">
    Push your branch to GitHub:

    ```bash theme={null}
    git push origin update-authentication-guide
    ```

    GitHub shows a prompt to open a pull request. Click it, add a description of what you changed and why, and submit.
  </Step>

  <Step title="Review the preview and merge">
    Mintlify automatically generates a preview deployment for your PR. Share the link with anyone who needs to review the changes. Once approved, merge the PR and your changes go live.
  </Step>
</Steps>

## What Mintlify does when you open a PR

When you open a pull request against your documentation repository, Mintlify's GitHub app does two things:

* **Runs checks**: Mintlify validates your changes (checking for broken links, missing metadata, and other issues) and reports the results directly in the PR.
* **Generates a preview**: A full preview of your documentation site with the PR's changes applied deploys and the app links it in the PR. Anyone with the link can review the exact published result before a single change goes live.

This is the quality gate of the docs-as-code workflow. Changes get reviewed in context and can be safely previewed before publishing.

<Quiz
  question="When you click Publish in the Mintlify web editor, what happens?"
  answers={[
{ text: "Your changes go live on your docs site immediately", correct: false },
{ text: "Mintlify creates a branch, commits your changes, and opens a pull request", correct: true },
{ text: "A draft is saved to your Mintlify dashboard for review", correct: false },
{ text: "An email is sent to your team requesting approval", correct: false },
]}
  correctFeedback="Right. The web editor handles the Git workflow for you — branching, committing, and opening a PR — all in one step. You still get a preview link and the chance to review before anything goes live."
  incorrectFeedback="Clicking Publish doesn't push changes live directly. Mintlify creates a branch, commits your changes, and opens a pull request on your behalf. From there, you review the preview and merge when you're ready."
/>

Next up: [Best practices for branches](/courses/git-github/branches) — when to create a branch, how to name it, and the full lifecycle from first edit to merged change.
