Command Palette
Search for a command to run

Branching and Merging

Create branches for experiments, open pull requests for code review, and merge changes with squash, rebase, or merge commit strategies.

Outpost Repositories support a full branching workflow, similar to Git. Branches let you develop features, run experiments, and iterate on datasets in isolation before merging changes back into the main branch.

Branching basics

Create a branch

Create a new branch from the current HEAD:

outpost branch my-experiment

Create a branch and switch to it immediately:

outpost checkout -b my-experiment

List branches

# List local branches outpost branch # List all branches including remote outpost branch -a

Switch branches

outpost checkout my-experiment
Note

If you have uncommitted changes that conflict with the target branch, Outpost will warn you. Commit or stash your changes before switching.

Delete a branch

# Delete a local branch outpost branch -d my-experiment # Force delete (even if unmerged) outpost branch -D my-experiment

Making changes

The standard workflow for making and tracking changes:

# Check which files have changed outpost status # Stage specific files outpost add data/training/*.csv outpost add model/weights.bin # Stage all changes outpost add . # Commit with a message outpost commit -m "Add augmented training data and updated weights" # View commit history outpost log # View changes between commits outpost diff HEAD~1
Tip

Use outpost status frequently to understand the state of your working directory. It shows staged, unstaged, and untracked files.

Pushing and pulling

Push changes to Outpost

# Push current branch outpost push # Push a specific branch outpost push origin my-experiment

Pull changes from Outpost

# Pull latest changes for the current branch outpost pull # Pull from a specific remote and branch outpost pull origin main

Pull requests

Pull requests are the primary mechanism for proposing changes and conducting reviews before merging into a protected branch.

Create a pull request

  1. Push your branch: outpost push origin my-experiment
  2. Navigate to your repository on the web UI, go to Pull Requests, click New Pull Request.
  3. Select your branch as source and main as base.
  4. Add a title and description explaining the change.
  5. Add reviewers in the Reviewers section.
  6. Click Create pull request.

Review a pull request

Reviewers can leave feedback on the Conversation tab or add line-by-line comments on the Changes tab:

  • Click the + icon next to a line to comment on it.
  • Click and drag the + icon to comment on a range of lines.
  • Click Approve to approve the PR, or select Request changes from the dropdown.
Note

You can mark files as Viewed on the Changes tab to collapse their diffs. If a viewed file is modified later, Outpost will flag it as Changed since last viewed.

Merging

Once a pull request is approved and all status checks pass, you can merge it using one of three strategies:

Merge strategies

Strategy Behavior Best for
Squash and merge Combines all commits into a single commit on the base branch Clean, linear history
Merge commit Creates a merge commit that joins the two branch histories Preserving full commit history
Rebase and merge Replays commits on top of the base branch Linear history with individual commits

Squash and merge is the default. To use a different strategy, click the dropdown next to the merge button.

Merge from the CLI

You can also merge locally:

# Switch to the target branch outpost checkout main # Merge the feature branch outpost merge my-experiment # Push the merged result outpost push

Handling merge conflicts

If Outpost detects conflicts during a merge, resolve them before completing:

  1. Pull latest and attempt the merge:
outpost checkout main outpost pull outpost checkout my-experiment outpost merge main
  1. Open conflicting files and resolve the conflict markers:
<<<<<<< HEAD current version of the data ======= incoming version of the data >>>>>>> my-experiment
  1. Stage and commit the resolution:
outpost add resolved-file.csv outpost commit -m "Resolve merge conflicts with main" outpost push

Branch protection

To enforce code review and prevent direct pushes to critical branches, configure branch protection rules. You can require:

  • A minimum number of approving reviews before merging.
  • All status checks to pass.
  • Branches to be up to date with the base branch before merging.
  • Restrictions on who can push to the branch.

For ML and data projects, we recommend a workflow based on short-lived feature branches:

  1. Create a branch for each experiment, dataset change, or feature (outpost checkout -b add-validation-set).
  2. Commit frequently with descriptive messages.
  3. Push and open a pull request early, even as a draft, to get feedback.
  4. Request reviews from teammates before merging.
  5. Squash and merge to keep the main branch history clean.
  6. Delete the branch after merging to reduce clutter.

Next steps

Previous Create & Clone

Next Large Files