Commit is a cornerstone of any OneGen project. It ties a set of changes together. For example, if you
User model in your project. You would connect this model to the rest of your
design. This is a pretty important change, right? But what if this change breaks something or if we later decide
User was a bad idea? It would be great if we could just revert the change in such case.
That's precisely what commits are for. You basically write a message describing the changes you have done and OneGen will bundle it together as a new version. For the example above, our commit message could be: Added User model.
If you create or open a OneGen project in the desktop app, you'll see the status sidebar located at the bottom of the screen. When you click on it, it will show you the current project changes. All of these changes would be a part of your next commit.
It's a good practice to always check the status before making a commit. Once you make a successful commit, the status will reset, and you'll there are no changes. That is until you make some new changes to the project.
If you move a model to the other side of the screen, it counts as a change and will be a part of the next commit.
It's pretty common to work on something, get tangled up and realize it would be better to start over. For that reason, there's the Discard Changes button in the top action bar. Discarding changes means to get rid of all the uncommitted changes, in other words, all changes you can see in the Status sidebar.
It's important to understand how commits fall into place when collaborating on a project.
Commit not only binds changes with a message into a new version, it also publishes the new version to everyone who have access to it. All the users who have access to the project will be notified inside the desktop app that they should update the given project to the latest version (your version).
That's the difference between local (uncommitted) changes and committed changes. As long as you make changes to your project without committing it, none of your allies can see the changes. This system makes it safe for each user to finish their work without interruptions before it's visible to anyone else.