Git #
SELECT workspaces are git repositories. Your SQL files, database configs, themes, and lint rules are all version-controlled and can be shared with your team.
Getting started #
Three ways to set up git on a workspace:
- Initialize and publish: creates a new repo and pushes to a remote you provide
- Link an existing repo: connects the workspace to a repo that already exists. If the remote has content, SELECT offers to checkout the remote branch or keep local files
- No git: you can skip git entirely and work locally
Operations #
The git panel exposes standard operations:
- Stage / Unstage: select which files to include in the next commit, or stage all at once
- Commit: create a commit from staged changes
- Pull: fetch and merge from origin. Pull with rebase is also available
- Push: push your branch to origin. Force push with lease is available when needed
- Revert: discard changes to a file or revert all uncommitted changes
- Branches: list branches and switch between them
You can also use the built-in terminal (`Ctrl+``) for any git operation you prefer to run manually.
What gets tracked #
Everything in the workspace folder is tracked by git, including:
.sqlfiles and their.metadata.jsonsidecarsdb.config.jsonfiles (credentials should use$VARreferences, not hardcoded values).envfiles (add to.gitignoreif they contain secrets).theme,.config, and.lintfiles
Use a .gitignore file to exclude files from version control. See .gitignore for details.
Sync #
When a workspace is connected to a remote, changes to users, roles, and permissions are synced through the SELECT backend. These are not stored in git but kept in sync across team members through the server.
Git tracks your files. The SELECT backend syncs your team settings (users, roles, permissions).