Note: Sync with Git applies to users subscribed to Team plan and above, refer to pricing.
Within a Team/Enterprise organization, you can create or clone a remote Project from Git via the Create Project dropdown from the Dashboard:
You need an existing remote git repo before you add a project of git-sync type.
To begin, click on the plus button:
Next on the Create a New Project modal select Git Sync from the options provided:
Then you will be asked to configure the remote git repository:
After configuring the remote git repo url, Insomnia will clone and parse the files from the repo.
If there are existing insomnia v5 format yaml files, we’ll import these file to the newly created project.cou
You can update your Git project in several ways:
You can change the name of your project to better reflect its purpose.
On the project list select your project and open the Project Settings modal
Rename your project and press update
The name of the project is not shared between users
You can switch your project to a Local Vault or Cloud Sync project if you decide to. This will not affect the remote repository but any changes that have been made in other branches rather than the current will be lost. Make sure you save and share your changes before switching the project type. Insomnia will ask for verification when switching between project types to make sure you don’t accidentally lose any data:
If you need to delete a Git project, you can do so through the project settings. Ensure that you have backed up any important data before proceeding.
On the project list find your project and select the delete action
Verify that you want to delete your project
You can use the Git Sync Dropdown to do all sorts of git operations on your project. It appears in the sidebar when a Git project is selected or when navigating inside any of the project’s files.
History:
Fetch changes to current branch
Commit changes
Insomnia files are stored as YAML files with the .yaml extension for ease of storage and retrieval. You can chose the fileName alongside the folder where it will be stored when creating a new file from Insomnia:
To enhance your experience with Git, we are fully concentrating on Git Projects and transitioning away from the previous Git Sync functionality, which was restricted to a single file per repository.
Existing files linked to Git will continue to function as they have in the past, allowing you to retain your data and migrate to the new Git Projects at your own pace.
To share all the files from your existing project using Git, you can convert your current project into a Git Project:
Access the project settings and choose Git Sync as the storage type.
Link it to your existing repository.
Keep in mind that all files within your project can now be synchronized using Git, allowing you to commit and push them to your repository effortlessly.
If you prefer not to share all the files from your existing project using Git, then you would need to create a New Git Project:
Begin by creating a new Git Project and linking it to your current repository.
Transfer your existing files to the newly created Git Project.
You can accomplish this by either exporting and importing your files, or
by utilizing the Duplicate action on the file and selecting your Git Project as the destination.
The Inso CLI will supports passing an Insomnia file directly. For example, you can use the command:
inso --file insomnia.workspace-1.yaml
This allows for seamless interaction with your Git projects through the command line.
When configuring a remote repository, you can chose to connect with GitHub or GitLab, or manually set up a remote repository.
NOTE: If you cannot find the repository you want to connect to, you will need to ask the repository or organization owner to install the Insomnia Desktop GitHub App.
Click Authorize to allow Insomnia to connect with your GitLab account.
If successful, you will be redirected to the Insomnia website with the message “Successfully authenticated Insomnia”.
Return to the Insomnia app and wait for sync to finish.
app.insomnia.rest
into the Insomnia app, then click Sync.Note: You may fail to set up Git Sync properly due to not enough or the wrong types of Git permissions.
Find instructions on how to create a personal access token or app password on the following platforms:
user:email
scope in order to correctly associate commits with your GitHub account.public_repo
when creating your token.repo
when creating your token.api
when creating your personal access token.Read
and Write
in the Repository
options when creating your app password.Once complete, click Done and the repository settings will be persisted for future operations. The author details and token can be updated as needed.
When working with Git, it’s good practice to make changes in separate branches. This has two benefits:
Note: Remote branches will only appear if they do not already exist locally.
Commit your changes via the branch dropdown menu. You’ll be prompted to add a descriptive message as your commit message.
Pushing your changes to your remote repository for the first time creates the .insomnia
directory, which you can use with the Inso CLI.
Note: If you’d like to push to an alternative branch than the default, click on the branch dropdown menu. Select Branches, and add your desired branch name.
Commits and branches only exist locally when created. A push needs to be done to share the commits and history of a branch remotely. If pushing fails, you will be given the option to force push.
The push or force push operation can fail for many reasons, and logs will be presented in the Developer Console prefixed with git-event
with further debugging information. A likely cause is that your user does not have permissions to push to a protected branch.
For instance, with GitLab, the main/master branch is protected by default, and those with the developer role are unable to push directly to it. In that case, push to a separate branch and create a pull request, or update the permissions for your user on the repository.
If a collaborator makes a change to the remote repository, pull the changes to access the work locally. Click the branch dropdown menu in a Document and then Pull. Any incoming changes will be merged to your local machine.
Sign out of a synced Git management account.
The Configure Repository box will no longer list the account that was signed out in its list of configured accounts.