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:
Create a branch and switch to it immediately:
List branches
Switch branches
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
Making changes
The standard workflow for making and tracking changes:
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
Pull changes from Outpost
Pull requests
Pull requests are the primary mechanism for proposing changes and conducting reviews before merging into a protected branch.
Create a pull request
- Push your branch:
outpost push origin my-experiment - Navigate to your repository on the web UI, go to Pull Requests, click New Pull Request.
- Select your branch as source and
mainas base. - Add a title and description explaining the change.
- Add reviewers in the Reviewers section.
- 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.
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:
Handling merge conflicts
If Outpost detects conflicts during a merge, resolve them before completing:
- Pull latest and attempt the merge:
- Open conflicting files and resolve the conflict markers:
- Stage and commit the resolution:
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.
Recommended workflow
For ML and data projects, we recommend a workflow based on short-lived feature branches:
- Create a branch for each experiment, dataset change, or feature (
outpost checkout -b add-validation-set). - Commit frequently with descriptive messages.
- Push and open a pull request early, even as a draft, to get feedback.
- Request reviews from teammates before merging.
- Squash and merge to keep the main branch history clean.
- Delete the branch after merging to reduce clutter.
Next steps
Previous → Create & Clone
Next Large Files →