Core Features
Git Integration
How Portal integrates with Git for version control
Git Integration
Portal leverages OpenCode's powerful Git integration to provide seamless version control for your projects.
Features
Portal supports all Git operations through OpenCode:
- Commit changes: Stage and commit files with meaningful messages
- Branch management: Create, switch, and merge branches
- Push/Pull: Sync with remote repositories
- Diff viewing: Review changes before committing
- Conflict resolution: Handle merge conflicts
How It Works
OpenCode automatically detects Git repositories and provides Git-aware features:
- Repository Detection: OpenCode identifies if your project is a Git repository
- Status Tracking: Track modified, staged, and untracked files
- Commit History: View and navigate commit history
Using Git in Portal
Git operations are performed through the chat interface. Simply ask OpenCode to:
"Commit my changes with message 'Add new feature'"
"Create a new branch called feature/auth"
"Push to origin"
"Show me the diff of my changes"Git Configuration
For Git operations to work properly, ensure your Git configuration is set up:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"SSH Keys
For pushing to remote repositories, make sure your SSH keys are configured:
# Generate SSH key if needed
ssh-keygen -t ed25519 -C "your@email.com"
# Add to ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519Add the public key to your GitHub/GitLab account.