Git Integration

TeamDay spaces have built-in Git support, allowing you to clone repositories, track changes, and sync with GitHub directly from the interface.

Overview

Each space can contain multiple Git repositories. When you clone a repo, it's placed in a subdirectory within your space, keeping your projects organized.

Space structure example:

my-space/
├── CLAUDE.md           # Space configuration
├── my-webapp/          # Cloned repository
│   ├── .git/
│   ├── src/
│   └── package.json
└── another-repo/       # Another cloned repository
    ├── .git/
    └── ...

Cloning a Repository

Public Repositories

  1. Open your space and go to the Files panel
  2. Click the + button in the toolbar
  3. Paste the repository URL (e.g., https://github.com/user/repo.git)
  4. Click Clone Repository

The repository will be cloned into a new folder named after the repo.

Private Repositories

For private repositories, you need to connect your GitHub account first:

  1. Click the + button to open the Clone Repository modal
  2. Paste your GitHub repository URL
  3. You'll see a GitHub connection card appear
  4. Click Connect to authorize TeamDay with GitHub
  5. After authorization, you'll be redirected back to your space
  6. The modal will show "GitHub Connected" with a green checkmark
  7. Now click Clone Repository

Note: GitHub authorization is stored per-space, so you only need to connect once per space.

Git Panel

The Git panel appears at the top of the Files sidebar and shows the status of your space's root directory.

Panel States

No Git Repository

  • Appears when the space root doesn't have Git initialized
  • You can either:
    • Clone a repo using the + button (recommended)
    • Initialize Git in the space root to track loose files

Git Repository Active

  • Shows the current branch name
  • Displays change count (staged + unstaged + untracked)
  • Shows ahead/behind indicators for remote sync status

Expanding the Panel

Click the Git panel header to expand it and see:

  • Remote repository URL
  • List of changed files (staged, modified, untracked)
  • Commit and sync controls

Common Operations

Staging Changes

  1. Expand the Git panel
  2. Review the changed files listed
  3. Click Stage all changes to stage everything

Or let your AI agent stage specific files using Git commands.

Committing

  1. Stage your changes first
  2. Enter a commit message in the text area
  3. Click Commit

Pushing to Remote

After committing:

  1. If you have commits to push, you'll see a Push button with the count
  2. Click Push to send your commits to the remote repository

Tip: If this is your first push, TeamDay will automatically set up the upstream branch.

Pulling Updates

If the remote has new commits:

  1. You'll see a Pull button with the count of commits behind
  2. Click Pull to fetch and merge the latest changes

Adding a Remote

If you initialized Git locally and want to connect to a remote:

  1. Expand the Git panel
  2. Click + Add remote
  3. Enter the repository URL
  4. Click Add

Working with AI Agents

AI agents in your space can use Git commands directly. They can:

  • Check status and diff
  • Stage and commit changes
  • Create branches
  • Push and pull (if GitHub is connected)

The CLAUDE.md file in your space provides agents with context about the workspace structure.

Troubleshooting

"Not a git repository"

This means the space root doesn't have Git initialized. This is normal if:

  • You cloned repos into subdirectories (they have their own .git)
  • You haven't initialized Git yet

To work with a cloned repo, navigate into its directory or use the file browser.

Authentication Failed

If cloning a private repo fails:

  1. Make sure you've connected GitHub (look for the green "GitHub Connected" badge)
  2. Verify you have access to the repository on GitHub
  3. Try disconnecting and reconnecting GitHub

Clone Timeout

Large repositories may timeout during clone. Try:

  • Cloning a smaller repository first
  • Using a shallow clone (coming soon)
  • Asking your AI agent to clone with --depth 1

Best Practices

  1. One repo per purpose - Clone separate repos for different projects rather than mixing everything
  2. Commit often - Small, frequent commits are easier to review and revert
  3. Write clear messages - Help your future self (and AI agents) understand changes
  4. Pull before push - Always pull the latest changes before pushing to avoid conflicts
  5. Use branches - Create branches for new features to keep main stable

Keyboard Shortcuts

ActionShortcut
Toggle Files panelCmd/Ctrl + B
Toggle Editor panelCmd/Ctrl + K

Privacy & Security

  • GitHub tokens are stored securely per-space
  • Tokens are only used to authenticate Git operations
  • TeamDay never stores your repository contents outside your space
  • You can disconnect GitHub at any time from space settings

Next Steps