Synchronize an Insomnia project with Git
Create a remote Git repository and an Insomnia project with Git Sync. Select the Git provider and connect to the repository. In the project, click the button at the bottom of the left pane to see the Git Sync menu and push your changes.
Prerequisites
Git repository
To synchronize an Insomnia project with Git, you need a Git repository. You can either use an existing repository with Insomnia content, or an empty repository.
Create a project
In this example, we’ll create a new project with Git Sync, but you can also update an existing cloud or local project to use Git Sync from the project settings.
- In your Insomnia organization, click the + button under PROJECTS in the left pane.
- Name your project, select Git Sync, and click Create.
- Select whether you want to clone the repository from GitHub, GitLab, or Git:
If your Git repository already contains Insomnia content, you will be prompted to import the content to your project.
v11.2+ If the repository contains legacy Insomnia content (from versions prior to 11.0), Insomnia will convert this content to the new format introduced in version 11.0.
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
Once you’ve created content or made changes to existing content in your project, you can push the changes to your repository:
- Click the name of the branch at the bottom of the left pane.
- Click Commit.
- Enter a commit message.
- Stage changes by clicking the + button next to the changes that you want to commit to the repository.
- Click Commit or Commit and push.