GitHub Integration Guide
Teta seamlessly integrates with GitHub to provide version control, collaboration, and deployment capabilities for your projects.Why GitHub Integration?
GitHub integration is required for all Teta projects. This ensures:- ✅ Version Control: Track all changes to your code
- ✅ Team Collaboration: Work together with your team
- ✅ Branch Protection: Never work directly on main/master
- ✅ Backup: Your code is always safe in your repository, never hosted by our side
- ✅ Deployment: Easy publishing and continuous deployment
Getting Started
Prerequisites
- A GitHub account (create one at github.com)
- A repository for your project
- Admin access to the repository
Initial Setup
Step 1: Install Teta GitHub App
- Go to Settings > GitHub in your Teta project
- Click “Connect GitHub”
- You’ll be redirected to GitHub
- Click “Install” on the Teta GitHub App
- Select which repositories to give access to:
- All repositories (easiest)
- Only select repositories (more control)
Step 2: Link Repository
- Return to Teta and start a new session
- Select your repository from the dropdown
- Choose the default branch (usually
mainormaster) - Click “Connect”
Step 3: Initialization
Teta will automatically:- Clone your repository
- Create a working branch (
teta/{feature}-{app}) - Set up the development environment
- Initialize the workspace
Important: Teta never works directly on your default branch. All changes happen on dedicated working branches.
How It Works
Branch Strategy
Teta uses a protective branch strategy:- Teta clones your default branch
- Creates a new branch:
teta/app-[your-app-id] - All AI changes are committed to this working branch
- You control when to merge back to main
Workspace Lifecycle
On First Connect
Working with Git
Committing Changes
The AI will always commits when it edits the code. Everytime the AI will:- Review all changes with
git statusandgit diff - Stage relevant files
- Create a descriptive commit message
- Commit to your working branch
Pushing to GitHub
To push your changes:- Verify there are commits to push
- Push to your working branch
- Confirm the push was successful
Creating Pull Requests
You can create the PR by clicking the button ‘Open PR’ inside the chat with the AI. This will redirect you to the review changes page on GitHub, where you can open the PR. Or you can ask Teta to create a PR:- Review all commits on your branch
- Generate a comprehensive PR description
- Create the PR using GitHub CLI (
gh) - Return the PR URL
Review Before Merging
Always review your working branch before merging to main:- Check the diff on GitHub
- Test the changes thoroughly
- Get team review if applicable
- Merge via pull request
Advanced Features
Viewing History
To see commit history:- Commit hashes
- Messages
- Authors
- Timestamps
Rolling Back Changes
To undo commits:Warning: Be careful with destructive operations. Always ensure work is backed up.
Troubleshooting
Connection Issues
Problem: Can’t connect to GitHub Solutions:- Check GitHub App is installed
- Verify repository access
- Ensure you have admin rights
- Try reinstalling the GitHub App
Push Failed
Problem: Cannot push to GitHub Solutions:- Check internet connection
- Verify branch name is correct
- Ensure you have write access
- Pull latest changes first
Merge Conflicts
Problem: Cannot merge branches Solutions:- Review conflicting files
- Use
git statusto see conflicts - Edit files to resolve conflicts
- Commit the resolution
- Ask AI for help if needed
Lost Connection
Problem: GitHub connection lost Solutions:- Go to Settings > GitHub
- Click “Reconnect”
- Reauthorize the app
- Verify repository access
Security Best Practices
Protect Sensitive Data
Never commit:- API keys and secrets
- Database passwords
- Private keys
- Environment variables with sensitive data
Use Environment Variables
For sensitive configuration:- Add to Settings > Secrets
- Reference in code as environment variables
- Never hardcode in source files
Review PRs Carefully
Before merging:- Check for accidentally committed secrets
- Review all file changes
- Verify tests pass
- Check for security vulnerabilities
GitHub CLI Integration
Teta uses GitHub CLI (gh) for advanced features:
Available Commands
From Other Platforms
If migrating from Lovable, FlutterFlow, Claude Code Web:- Export your code
- Create a GitHub repository
- Push code to GitHub
- Connect to Teta
- You’re done!
Conclusion
GitHub integration is central to the Teta development experience. It ensures your code is safe, versioned, and ready for collaboration and deployment.Related Documentation
- Getting Started - Platform basics
- AI Agents - Custom AI workflows
- Preview Controls - Development workflow
Need help? Contact support@teta.so