Branches & Pull Requests
Pro plan. Available on Pro and above, during the free trial, and in every self-hosted install.
Publishing straight to your main branch is fine for a personal blog. For anything with review, staging, or more than one editor, work on a branch and merge through a pull request β all from inside Sitepins.
Switching Branches
The branch switcher sits in the project header. Click it to see every branch in the repository, with the default branch marked. Thereβs a search box for repositories with a lot of them.
Pick a branch and the whole project switches to it β content, media, configs, and code all reflect that branch. Everything you publish goes to it until you switch again.
Creating a Branch
- Open the branch switcher
- Click Create New Branch
- Name it β
staging,redesign,client-review - Confirm
The branch is created from the one youβre currently on, and Sitepins switches you to it.
You can also change a projectβs branch permanently at Project Settings β Git β Branch Management. That sets the branch the project defaults to for everyone, as opposed to switching your own view.
Opening a Pull Request
When your branch has changes that arenβt on the base branch, Sitepins shows a Changes detected notice on the project page.
- Click Create GitHub Request (or Create GitLab Request)
- Enter a Title
- Optionally add a Description
- Submit
Sitepins opens a real pull request on GitHub or a merge request on GitLab. Reviewers can comment on it in the usual place, with the usual tools β itβs an ordinary PR.
Merging
Once the request is approved, click Merge in Sitepins to merge it into the base branch. Your host builds from the base branch and the change goes live.
View Request opens it on GitHub or GitLab if youβd rather merge there, or need to resolve conflicts.
Permissions
The GitHub App needs Pull requests: Write to create and merge PRs. If itβs missing, Sitepins says so explicitly:
Your GitHub App needs βPull requests: Writeβ permission
Fix it by updating the appβs permissions on GitHub and approving the change. See Git Repository Settings.
A Review Workflow
A pattern that works well for agencies and content teams:
- Create a
stagingbranch and connect your host to deploy it to a preview URL - Set the projectβs branch to
stagingin Project Settings β Git - Editors publish to
stagingas usual β nothing about their workflow changes - When the batch is ready, open a pull request to
main - Review the diff, merge, and production builds
Editors never see a branch decision. They just publish, and someone with the right role decides when work goes live.
Combine this with the Editor role and you have review without asking non-technical people to learn Git.
Live Preview on a Branch
Live preview runs against your current branch, so you can see a branch rendering before merging it β no deploy preview required.
Conflicts
Sitepins doesnβt resolve merge conflicts. If a merge conflicts, use View Request to open it on GitHub or GitLab and resolve it there. Once itβs resolved, Sitepins reflects the result.