Version Control Sync
Note: Version Control Sync applies only to remote Collections at this time. Collections use our own Insomnia Sync for versioning. This feature comes with paid subscriptions. See Pricing for more information. To learn about Git sync for Documents, refer to Git Sync.
In this section, you will find documentation on Collections Sync and Snapshots.
Sync for remote Collections provides the following abilities on top of the base Insomnia functionality:
- Snapshot the contents of a request collection
- Revert a request collection to a previous Snapshot
- Share Snapshots across devices or with members of your team
- Create and work on separate branches
The main features of sync (once enabled automatically or manually) can be accessed from the dropdown at the top right of the application when you are in a remote Collection.
For versioning options on a Collection, click on the large branch name button.
On creating a request Collection within a Remote Project, Insomnia will attempt to automatically enable sync and push an initial snapshot.
Manually Enable Sync
If Insomnia is unable to or has not automatically enabled sync, then you can manually set this up. First click Setup Sync then Create Local Project. Then you can create and push your first Snapshot.
Note: Can’t see the Sync menu? Make sure you’re logged in by clicking on the person icon in the top right corner of your application. If you see a logout option, you’re logged in. If you still can’t see the Sync menu, make sure you’re inside a remote Project from the Dashboard.
Enable Git sync within a Collection by clicking the Setup Sync button.
When sync is enabled on a Collection inside a Project, all users that have access to the Project also gain access to that Collection. You can manage the members in your Project from the web dashboard.
This section provides information on using the paid Snapshot feature for remote Collections. For pricing information, see our Pricing page.
To create a Snapshot, open a remote Collection and click on the branch dropdown menu next to Preferences, and then click Create Snapshot. A Create Snapshot modal will open.
Within a remote Collection, click on the branch dropdown and click on Create Snapshot.
Snapshots represent all data in a Collection (requests, folders, environments) at a specific point in time. Besides the data within the Collection, a Snapshot also details:
- The Snapshot author
- The time that the Snapshot was created
- A message describing any changes in the Snapshot
Creating a Snapshot requires two actions:
- Describe the changes contained within the Snapshot
- Select which changes to include
Write a Snapshot Message
Snapshot messages should describe the included changes in as much detail as possible, as this description will help identify the snapshot if you ever need to revert back to it.
Add Changes to a Snapshot
Changes made to a request collection can be added on a granular level. Modifications and deletions to existing requests, folders, etc (AKA objects) will appear under Modified Objects, while new additions will appear under Unversioned Objects and are unselected by default.
Once a Snapshot is created, it can be shared to your Insomnia account or team. There are two ways to push Snapshots:
- Use the Create and Push option when creating the Snapshot
- Push un-synced Snapshots from within the main sync menu
If there are new Snapshots available that do not yet exist on your device (eg. from a team) these will be available to pull down from within the sync menu.
Work with Branches
All Snapshots created for Sync are stored in a branch. Branches are identified by name and each one maintains a list of Snapshots that have been created for it (ie. its history). Branches can be created or deleted at any time, shared with team members, and even merged together.
Branches can be useful for many reasons, but the two main use cases are the following:
- Separate personal work from other team members
- Work on experimental changes that may or may not exist long-term
Branches are managed within the branches dialog. Here, you can create local branches, merge branches, and fetch remote branches.
Share a Request Collection
To get started sharing workspaces with your team, see Team Collaboration.
Revert to a Previous Snapshot
You can revert a Collection to a previous Snapshot. Find the Snapshot you want to revert to by going to the branch dropdown and clicking on History. Then click Restore on the Snapshot you want to revert to.
When you restore a Snapshot, it will show the changes locally and you’ll need to manually Snapshot the changes.