Git Integration
Zentro integrates with Git to give your saved SQL scripts version history, diffs, and commit tracking — without leaving the app.
How It Works
Zentro stores saved scripts as .sql files in a project-local directory. If that directory is inside a Git repository, Zentro's Git panel activates automatically and starts tracking changes.
The Git Panel
Open the Git panel from the left sidebar (branch icon) or press Ctrl+Shift+G.
The panel shows:
- Current branch name
- Modified files — scripts changed since the last commit
- Untracked files — new scripts not yet committed
- Commit history — recent commits with message, author, date
Viewing Diffs
Click any modified file in the Git panel to open a diff view — the editor splits to show the previous version on the left and the current version on the right, with additions in green and deletions in red.
Committing Changes
- Check the boxes next to files you want to commit (or Select All)
- Type a commit message in the input at the bottom of the panel
- Click Commit
Zentro commits using the Git identity configured in your system (git config user.name / user.email).
Browsing History
Click any commit in the history list to see:
- Which files changed
- The diff for each file
- The full commit message
Click Open at this commit to load that version of a script in a read-only editor tab — useful for recovering an older query.
Branch Switching
The branch selector at the top of the Git panel lets you switch branches. Switching will discard any uncommitted local changes (Zentro warns you first).
Requirements
- Git must be installed on your machine and available on
PATH - The scripts directory must be inside a Git repository (Zentro does not create the repo for you — run
git initin the directory first, or clone an existing one)
Typical Workflow
- Keep your scripts in a Git-tracked folder
- After writing a useful query, save it as a script (
Ctrl+S) - Open the Git panel, stage the file, commit with a message like
"add: weekly_revenue query" - Push to your remote from the terminal — Zentro doesn't push directly, it only manages local commits