Install and connect
Install the GitDB extension, sign in with your gitdb.co account, and connect to a repository.
Install the extension
In VS Code the extension is named GitDB, and its identifier is keyes-ai.gitdb-vscode. It's distributed as a .vsix package file, which you get from your team or your GitDB distribution channel. To install it from the .vsix file:
- Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS).
- Run Extensions: Install from VSIX… and select the
.vsixfile.
When the install finishes, a GitDB icon appears in the activity bar and the status bar shows GitDB: Not connected.
Connect for the first time
- Start the connection in one of these ways:
- Click GitDB: Not connected in the status bar.
- Open the GitDB view in the activity bar and click Connect to GitDB.
- Run GitDB: Connect from the Command Palette.
- Your browser opens gitdb.co. If you're not signed in, sign in first. The authorization page comes back after you sign in.
- Click Authorize VS Code. This lets VS Code access your repositories on your behalf.
- Your browser sends you back to VS Code. If your browser or VS Code asks for permission to open the link, allow it.
- The GitDB view now lists your repositories under Select a Repository, with the message "Click a repository to connect to it." Each row shows
organization/namewith the repository's visibility and default branch. Click a repository to connect to it.
When the connection is ready, you'll see GitDB: Connected to organization/name @ branch. The status bar shows GitDB: organization/name @ branch | MCP: running, the Files, Refs, and History views appear under the GitDB icon, and the repository list is titled Repos.
Things to know about connecting
- Finish within 5 minutes. If you don't, VS Code shows GitDB sign-in timed out. Please try connecting again. Run GitDB: Connect again.
- Verify your email first. Authorization fails with a request to verify your email if your gitdb.co email address hasn't been verified. See Create an account.
- The list shows up to 20 repositories. These are the 20 most recently updated repositories you can access. If yours isn't listed, connect to any repository first. Then use Search Repos… in the Repos view to find it, as described in Switch repositories.
- You need a repository first. If your account has no repositories, the list says No repositories yet. Create one on gitdb.co, then refresh this list. Create one (see Create your first repository), then click the refresh icon in the list's title bar.
- You start on the default branch. The extension opens the repository's default branch. If that branch can't be found, it uses
mainormaster. If neither exists, it opens the first branch it finds and warns: no default branch (main/master) is set. Set a default branch in the repository's settings on gitdb.co to fix this.
Signing in later
VS Code keeps your sign-in in its secure storage, so later connections skip the browser: GitDB: Connect goes straight to the repository list in the GitDB view. If your saved sign-in is no longer valid, GitDB: Connect opens the browser sign-in again.
Automatic connection when VS Code starts
After your first connection, VS Code reconnects to the same repository every time it starts, as long as you're still signed in. It always opens the repository's default branch, not the branch you were on last time. Starting up never opens your browser.
If gitdb.co no longer accepts your saved sign-in, the extension forgets it and the GitDB view shows Connect to GitDB again. If the connection fails for another reason, you'll see GitDB: could not connect to "organization/name" and can pick a repository from the list in the GitDB view. If the repository has been deleted on gitdb.co, the extension drops it without an error and shows the list.
The extension saves the repository in your User settings as gitdb.defaultRepo. To stop connecting automatically, clear that setting, or sign out. Connecting to a repository sets it again.
Switch repositories
While you're connected, you can switch to another repository in either of these ways:
- In the Repos view, right-click a repository and choose GitDB: Switch to This Repo.
- In the Repos view, click the search icon (GitDB: Search Repos…) and type part of a name. It searches every repository you can access, matching names and descriptions, and shows up to 20 matches. Pick one to switch to it.
Switching reconnects the extension to the new repository, on its default branch. VS Code will also reconnect to that repository the next time it starts. If the repository was deleted on gitdb.co, you'll see an error saying so, and you're disconnected. Your drafts in the previous repository stay saved on GitDB and come back when you connect to it again. The extension's MCP server restarts for the new repository, so if you use an AI agent, copy its configuration again (see MCP server for AI agents).
To switch branches instead, see Views and search.
Disconnect
Run GitDB: Disconnect to end the connection:
- The Files, Refs, and History views close, and the status bar shows GitDB: Not connected. While you're signed in, the GitDB view keeps your repository list so you can pick one to connect to.
- The MCP server the extension runs for you stops.
- Your drafts stay saved on GitDB.
Disconnect doesn't sign you out, and it doesn't turn off automatic connection. The next time VS Code starts, it reconnects to the same repository. To prevent that, sign out or clear gitdb.defaultRepo as described above.
Disconnecting also doesn't affect an AI agent that's using a copied MCP configuration. That configuration keeps working until its access token stops working (see MCP server for AI agents).
Sign out
Run GitDB: Sign Out from the Command Palette, or choose it from the … menu in the title bar of the Files or Repos view. Signing out:
- disconnects, if you're connected
- clears
gitdb.defaultRepo, so VS Code no longer connects automatically when it starts - revokes your sign-in on gitdb.co and removes it from VS Code's secure storage
The GitDB view then shows Connect to GitDB again, and you'll see GitDB: Signed out. If gitdb.co can't be reached to revoke the sign-in, you're still signed out in VS Code, and a warning says the sign-in will expire on its own. If a connection is still in progress, finish it first, then sign out.
Signing out revokes the access token VS Code is currently using, so a copied MCP configuration that holds it stops working too.
Troubleshooting sign-in
| What you see | What to do |
|---|---|
| Could not open the browser for GitDB sign-in. | VS Code couldn't open your default browser. Check your system's default browser setting, then run GitDB: Connect again. |
| GitDB sign-in timed out. Please try connecting again. | You have 5 minutes to finish signing in. Run GitDB: Connect again. |
| A message starting with GitDB: sign-in failed | The rest of the message says what went wrong. Fix the cause and run GitDB: Connect again. |
For more detail, turn on the gitdb.trace setting in your User settings. The extension then writes connection diagnostics to the GitDB Auth output channel (View › Output). Tokens, codes, and URLs are never logged.