This plugin can sync service calls of a project to git and pull from it. Currently, the plugin does not support branches, it only uses the default branch. Conflicts get solved on overwrite basis only. You can decide if you want to send your local version to server, or overwrite your local changes with the current server version. Therefore, it is a good idea to always pull before doing changes.
- Create a GIT Repository on your GIT instance
If these steps are not followed, you will not be able to use this fork of the plugin.
First of all, you must create a branch by the name insomnia in your repo, preferably using following way:
git checkout --orphan insomnia
git rm -rf .
touch .gitignore
git add .
git commit -m "First commit"
git push -u origin insomnia
After that, follow remaning steps below.
- Set Repository URL: click on project name in Insomnia > Set GIT Repository URL
- Click on project name in Insomnia > Push to GIT Repository
- Create a project with the same name as used before
- Set Repository URL: click on project name in Insomnia > Set GIT Repository URL
- Click on project name in Insomnia > Pull from GIT Repository
Changes in this fork allow the insomnia workspace to be saved in a git branch by the name insomina in your project repo. The advantage of that is the insomnia branch does not contain any other project file, and only the wokrspace json. So using this fork of plugin makes it a bit easier for me to keep insomnia workspace within the main project repo, without affecting any of the project files.