Synchronize Insomnia content with Git
Pro and above
and uses:
Insomnia
Related Documentation
TL;DR
Create an empty remote Git repository and an Insomnia workspace. In the workspace, click the button at the bottom of the left pane and connect the repository, then commit and push your content.
Prerequisites
Git repository
Create an empty remote Git repository.
Insomnia workspace
Create a workspace in Insomnia. A workspace can be a design document, a collection, a mock server, or an environment.
Connect to the repository
Select whether you want to clone the repository from GitHub, GitLab, or Git.
Create a new branch
Insomnia synchronizes with the repository’s default branch, but it’s a good practice to make changes on a different branch.
- Click the name of the branch at the bottom of the left pane to see the Git sync menu.
- Click Branches.
- Enter a name for the new branch and click Create.
Commit and push the content to your repository
- Click the name of the branch.
- Click Commit.
- Enter a commit message.
- Select the content that you want to commit to the repository.
- Click Commit, then click Close once the changes are committed.
- Click the name of the branch and click Push.
You can see in your repository that Insomnia added a .insomnia
directory with your content in it.