Skip to content

Latest commit

 

History

History
116 lines (84 loc) · 4.79 KB

File metadata and controls

116 lines (84 loc) · 4.79 KB

Source control

T3 Code integrates with GitHub, GitLab, Bitbucket, and Azure DevOps to clone and publish repositories, create pull requests, and review changes.

Connect an account

Install Git and configure authentication on the machine running your T3 Code server. For a remote environment, do this on the remote machine. After signing in, open Settings → Source Control and choose Rescan.

GitHub

Install GitHub CLI 2.81.0 or newer, then sign in:

gh auth login

Work with Local Changes

  • Open the Source Control panel from the branch icon in the workspace title bar or with Cmd/Ctrl + Shift + G. The panel stays open when you switch threads and follows the active project.
  • Write a commit message at the top of the panel, then stage individual files or whole change groups. Changed files use a collapsible folder tree by default. When nothing is staged, the message generator describes all active changes, and the primary commit action stages and commits them together. If anything is already staged, generation and commit continue to use only that staged selection.
  • Use the graph button in the repository toolbar to switch between working-copy changes and commit history. Search, refresh, sync, stash, undo, and discard actions live in the same toolbar.
  • Source Control can remain open beside the standard right panel, including while viewing a file diff.
  • Discarding one file, a folder or change group, or all changes always asks for confirmation first. When Git supports backups, the success message also offers Undo.
  • Stash apply, pop, and drop, and restoring a discard backup, verify the exact stash entry shown before changing anything. If the stash list moved meanwhile, from another device or a terminal, the action is refused and asks you to refresh rather than touching a different entry. Repository changes made from another device or the terminal refresh the open panel views automatically.
  • After upgrading, a commit message drafted before drafts became per-server appears under the commit box as Recover old commit draft…, where you choose to use it here or discard it.

GitLab

Install GitLab CLI, then sign in:

glab auth login

Bitbucket

Set an access token in the server's environment:

export T3CODE_BITBUCKET_ACCESS_TOKEN="your-access-token"

Or use an Atlassian account email and API token with read/write access to repositories and pull requests, plus user read access (read:user:bitbucket):

export T3CODE_BITBUCKET_EMAIL="you@example.com"
export T3CODE_BITBUCKET_API_TOKEN="your-token"

The access token takes precedence if both are configured. Restart the server after changing these variables.

Azure DevOps

Install Azure CLI, add the DevOps extension, and sign in:

az extension add --name azure-devops
az login

Clone or publish a project

Use Add Project in the command palette (Cmd/Ctrl+K) to clone a repository. Choose a hosting provider or paste a Git URL, then choose where to save it.

For a local Git repository without a remote, Publish Repository creates a hosted repository, adds it as origin, and pushes your commits. If there are no commits yet, it creates the remote; make your first commit before pushing.

Create a pull request

Use a thread's Git actions to commit, push, and create a pull request. T3 Code can generate commit messages, review titles, and descriptions from your changes.

Choose the writing style and model in Settings → Source Control. Repository conventions uses the project's instructions and recent commit subjects.

Review and merge

Open Pull requests to review changes and comments, request reviewers, check out a branch, or merge. You can edit review titles and descriptions and your own comments where the host allows it. GitLab calls these merge requests.

GitHub, GitLab, and Azure DevOps support auto-merge while checks are outstanding. GitHub also supports approving waiting fork workflows and opening a revert pull request for a merged change.

For Azure DevOps, use the host website to view diffs or change comments. Bitbucket does not support reopening a declined pull request.

Troubleshooting

  • Not authenticated: run the provider's login command on the server, then rescan. For Bitbucket, confirm the running server received the environment variables.
  • GitHub sign-in cannot be verified: update GitHub CLI to at least 2.81.0.
  • Push fails despite a connected account: check the Git remote's credentials. SSH and HTTPS remotes can require separate setup from the hosting provider's API access.
  • A review cannot load: open it on the host website while resolving connectivity, permissions, or rate limits.