Write & reuse SQL
Browse local Git SQL projects
Inspect SQL files, local branch state, and diffs without leaving the workspace.
What this feature does
Link a local repository, open a SQL file, review its status, and switch only when the working tree is clean.
When to use it
Use this to browse SQL files and local changes in an existing Git checkout from SqlOtter.
Before you start
Use an existing local Git checkout and branch.
Default shortcuts
Use the dedicated UI for Git project browsing; SQL file shortcuts act on editor file operations.
| Action | Windows / Linux | macOS | Focus and effect |
|---|---|---|---|
| Open Git SQL Project | No dedicated default | No dedicated default | Open from AI & Sql Editor and select a local repository; no dedicated default is assigned. |
| Browse a project and load a script | No dedicated default | No dedicated default | Use the project, branch, and file controls; loading a script does not execute it. |
| Load a SQL file | Ctrl+Alt+Shift+L | ⌘+⌥+Shift+L | Load a local file into the SQL Editor without automatically executing it. |
| Save the SQL file | Ctrl+Alt+S | ⌘+⌥+S | In the SQL Editor, write or choose a local .sql file; check the overwrite destination. |
- Settings → Shortcuts shows configurable bindings; customized keys take precedence. Fixed dialog keys and mouse gestures may be managed by their own controls.
- On macOS, ⌘ means Command and ⌥ means Option. Function keys may require Fn. Delete means forward delete (often Fn+⌫ on a compact Mac keyboard); use the menu when Insert is unavailable.
How to use it
- Open AI & Sql Editor > Git SQL Project and select a local repository.
- Review SQL files, current branch, worktree state, and available diffs.
- Open a SQL file and resolve unsaved editor changes before replacing text.
- Switch an existing local branch only after the displayed guards pass.
What to expect
The editor opens the selected repository file while Git branch state remains local.
Limits and safety
- The Git view does not create commits or sync a remote repository.
- Workspaces linked to the same checkout share its files and branch state.
If something goes wrong
- If a repository is not listed, verify its local folder and Git metadata and make sure the current user can read it.
- If the branch or diff looks stale, refresh the local view; do not assume the viewer has fetched remote updates.