With Sigma you can commit and version-control your code, just like any other IDE. However it does not require you to install any version control tools locally, and works completely within your browser.
Sigma supports git
for version control, via
AWS CodeCommit support is also on the roadmap.
When you work in Sigma, code, cloud resource and configuration changes you make are automatically synced to the browser’s local storage. So, effectively, your work is auto-saved locally - and gets automatically restored whenever you revisit the IDE; unless the local storage gets cleared:
localStorage.clear()
invocation on the sigma.slappforge.com
domain)Hence it is recommended to periodically commit your changes to an external version control system (VCS) for long-term persistence. It also complies with development best practices, and serves as a changelog for your project.
To promote this good practice, Sigma will automatically prompt you to commit your changes whenever you try to build or deploy your project after making changes.
NOTE: Some actions allow you to bypass this commit step:
However, even in such cases, it is recommended to commit your changes at your earliest convenience.
You can commit (save) the current status of your Sigma project any time, via:
If you have not already integrated Sigma with a source provider, you will be asked to do so:
Click the appropriate source provider icon, and authorize Sigma to perform VCS actions on your behalf.
Next, Sigma prompts you to choose a VCS repository to commit to, and a commit message:
Sigma automatically generates a repo name based on your project name; if you want to commit to a different repo, toggle the Use a different repository option and enter the desired VCS username-repo name combination.
Enter a desired commit message and click Commit & Push.
Sigma then checks whether the selected repository exists and you have permissions to write to it. If the repo is missing, it asks for confirmation to create it for you.
Alternatively, if the repository already exists and this is the first time the current project is being committed, Sigma asks for your confirmation - since saving the new code to an existing repo can result in overwrites and loss of previous data.
After these checks, Sigma:
During this time, you would observe a progress indicator on the IDE’s status bar, indicating the current operation; “Preparing committing”, “Committing changes”, etc.
When done, Sigma displays a “Successfully committed changes” toast.
If the remote contains changes that were not available at the time of cloning, a merge occurs at pushing. Sigma usually takes care of this automatically; however, if there are conflicting changes for the same code snippet or resource definition, a conflict arises and Sigma would need your assistance to resolve it before continuing.
In this case, Sigma stops and displays a summary of conflicted changes, with an option to handle each one separately:
Sigma categorizes conflicts as:
and offers you the option to either:
Once you have completed resolving the conflicts, click Proceed and Merge so that Sigma can make a merge commit and proceed with the push.