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
- Open your space and go to the Files panel
- Click the + button in the toolbar
- Paste the repository URL (e.g.,
https://github.com/user/repo.git) - 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:
- Click the + button to open the Clone Repository modal
- Paste your GitHub repository URL
- You'll see a GitHub connection card appear
- Click Connect to authorize TeamDay with GitHub
- After authorization, you'll be redirected back to your space
- The modal will show "GitHub Connected" with a green checkmark
- 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
- Expand the Git panel
- Review the changed files listed
- Click Stage all changes to stage everything
Or let your AI agent stage specific files using Git commands.
Committing
- Stage your changes first
- Enter a commit message in the text area
- Click Commit
Pushing to Remote
After committing:
- If you have commits to push, you'll see a Push button with the count
- 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:
- You'll see a Pull button with the count of commits behind
- Click Pull to fetch and merge the latest changes
Adding a Remote
If you initialized Git locally and want to connect to a remote:
- Expand the Git panel
- Click + Add remote
- Enter the repository URL
- 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:
- Make sure you've connected GitHub (look for the green "GitHub Connected" badge)
- Verify you have access to the repository on GitHub
- 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
- One repo per purpose - Clone separate repos for different projects rather than mixing everything
- Commit often - Small, frequent commits are easier to review and revert
- Write clear messages - Help your future self (and AI agents) understand changes
- Pull before push - Always pull the latest changes before pushing to avoid conflicts
- Use branches - Create branches for new features to keep main stable
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Toggle Files panel | Cmd/Ctrl + B |
| Toggle Editor panel | Cmd/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
- Chat Interface - Learn how to interact with your AI agents
- Troubleshooting - Diagnose and resolve common issues