Work on API collection changes in a Git branch

When a collection lives in a Git repository, a change to it is a change to the repository. Adding a refund endpoint to the Payments collection should go where the refund code goes: a feature branch, reviewed and merged with it. Requestarium lets a synced collection switch branches, create one and compare two, without unlinking it and without leaving the app.

Where the collection syncs today

Open the collection's Overview ▸ Sync with Git. The Branches section starts with a line such as Branch main · default branch. Default branch is what the provider reports as the repository's default; everything else is a feature branch.

Branches… lists the current branch first, then the default branch, then the rest by name, up to 100. Type in Search branches to narrow a long list.

This works with GitHub, GitLab, Bitbucket, Azure DevOps, Gitea or Forgejo and AWS CodeCommit, on their cloud and self-managed servers.

Start a feature branch

The usual flow mirrors code work:

  1. Edit the collection: add the request, change the test.
  2. Press New branch from main…, name it feature/refunds. Switch to it is ticked, so the collection moves to the new branch and your edits come along.
  3. Push. The commit lands on feature/refunds.
  4. Open a pull request for the branch, next to the code change.

Branch names follow Git's rules. Names that start with requestarium/sync- are reserved for the branches Requestarium makes when it pushes through a pull request.

Switch to a teammate's branch

Press Switch next to a branch. The link moves to that branch, and the collection is pulled with a normal three-way merge from the commit it was last synced with, so it becomes what the branch holds. Nothing in the repository changes.

If you have edits that were never pushed, Requestarium asks first:

ChoiceWhat happens
Keep my edits (default)The edits come along and show as outgoing changes on the new branch. If the branch changed the same field, it's a conflict to settle, and nothing is lost meanwhile
Discard themThe collection becomes exactly what the branch holds. Environments are left alone
CancelStay where you are, push first, switch later

The link is shared by the workspace, so switching moves the collection for every member, the same way linking does. Webhooks and scheduled checks follow the link and watch the new branch from then on.

Compare two branches

Compare next to a branch shows what it changes compared with the current one: requests, folders and (if the link syncs them) environments that were added, changed or deleted, and for each changed object every field that differs, side by side. Open in GitHub (or your provider) jumps to the provider's own compare page, where you can open the pull request.

The comparison reads both branches from the repository. Your local, unpushed edits aren't part of it and aren't touched.

From the terminal

The same operations are in the CLI, which is handy in scripts and review jobs:

Terminal
requestarium sync branch list "Payments API" --search refund
requestarium sync branch create "Payments API" feature/refunds
requestarium sync branch switch "Payments API" main --strategy ours
requestarium sync diff "Payments API" --branch feature/refunds --check

sync diff --check exits with code 1 when the branches differ, so a pipeline can tell whether a branch touched the collection at all.

Limits worth knowing

  • One collection syncs with one branch at a time. Two people can't work on two branches of the same collection at once; duplicate the collection and link the copy to another folder for that.
  • Deleting, renaming and merging branches is done in the provider.
  • Listing and switching branches work on every plan. Creating and comparing branches are part of the Team plan.

Switches and new branches are recorded in the collection's sync history and in the organization's audit log, so "who moved Payments to that branch?" has an answer.