Branching and Publishing

Work on changes safely, review them with your team, and publish updates without disrupting your main workspace.
View as Markdown

Working in a Branch

Once you’re on a branch, you can edit content, components, and design tokens freely.

  • Automatic saving: All changes are saved to the Knapsack database as you work.
  • Real-time collaboration: Other users see your updates instantly through live collaboration.

Creating a Branch

  1. Navigate to your workspace and confirm you’re on the Latest version.
  2. Click Edit (requires edit permissions).
  3. Enter a branch title (optional—Knapsack will generate one automatically).

When you create a branch, a corresponding Git branch is created if your workspace is connected to a repository.


Requesting Review

When your changes are ready to be reviewed:

  1. Click Request Review.
  2. Knapsack will:
    • Mark the branch as In Review (it becomes read-only).
    • Create a pull request in your connected Git repository, if applicable.

Your team can review and approve changes directly in Knapsack or through your Git platform.


Editing a Branch in Review

If you need to make additional changes during review:

  1. Convert the branch back to Draft status by clicking Edit.
  2. Make your edits.
  3. Resubmit for review when ready.

Publishing (Admins Only)

Admins can publish a branch directly without going through a formal review.

  1. Click Publish.
  2. Knapsack will:
    • Mark the branch as Published.
    • Update the main branch in your workspace and Git repository (if configured).
    • Trigger deployment of the updated workspace.

Branch Management

You can manage branches using the following actions:

  • Edit: Convert an “In Review” branch back to Draft.
  • Delete: Remove a branch (and its associated Git branch, if applicable).
  • Switch: Move between different branches.
  • Rename: Update branch titles for clarity.

Best Practices

Branch Naming

  • Knapsack automatically names branches knapsack/{instanceId}.
  • Use descriptive titles for easier identification.
  • Agree on a consistent naming convention across your team.

Collaboration

  • Create separate branches for features, fixes, and experiments.
  • Use reviews to ensure quality and alignment.
  • Communicate the purpose of each branch with your team.

Git Integration (Optional)

  • Keep your repository in sync with Knapsack.
  • Review pull requests thoroughly before merging.
  • Keep your main branch stable and ready for deployment.

Getting Help

If you run into issues:

  • Check your role permissions.
  • Verify your workspace or Git configuration (if applicable).
  • Contact your workspace admin for access or publishing help.
  • Reach out to Knapsack support for technical issues.