Version control with Git
Every Project is a git repository. Commit, review object-level Scene diffs, use branches and remotes, and track large files with Git LFS.
Every Project is a git repository you own. Studio runs your installed git
on the Project folder. It never stores credentials and never rewrites history
you have shared.
Requirements#
Install git. If git is missing, Projects still work but have no repository and the Git view stays empty.
Studio uses your git identity (user.name, user.email). If you have none,
it uses the name and email of your WiTwin account for the first commit, and
you can set an identity in the Git settings.
The Git view#
The top bar shows the current branch and the number of changed files. Click it to open the Git view, where you can:
- stage, unstage and discard files
- write a commit message, or let the model write one from the staged changes
- see the history and open any commit
- create, switch and delete branches
- fetch, pull and push to remotes
Scene diffs#
.wtscene files are text, but the Git view also shows a Scene change as
objects: which entities were added, removed or changed, and which fields
changed from what to what. Use it to review an Agent's edits before you
commit them.
Agent turns#
You can let Studio commit after each Agent turn that changed files. Turn it on in the Git settings. Each commit then holds one turn's changes, which makes them easy to review and revert.
Large files#
Meshes, textures and solver outputs can be large. The Git view can enable
Git LFS for the Project and track file patterns with it. git lfs must be
installed.
Line endings#
New Projects include a .gitattributes with *.wtscene text eol=lf, so Scene
files compare cleanly between Windows, macOS and Linux.