Create Feature Workspace
What You'll Accomplish
Set up an isolated workspace for developing a new feature without affecting your main branch. Uses git worktrees to enable parallel development on multiple features.
Prerequisites
Required Knowledge
New to git worktrees? Learn these concepts first: - Working with Git Worktrees - Understand parallel development with workspaces
Required Setup
- Working in a git repository
- Changes in current workspace committed
- Know the feature name or branch you want to create
Steps
1. Create the Workspace
What happens: Creates new branch feature/authentication and worktree in ../simply-cli-feature-authentication
2. Navigate to New Workspace
What happens: You're now in isolated workspace with dedicated file state
3. Verify Workspace Created
What happens: Shows list of all workspaces with their branches and paths
4. Start Working
Example Scenario
You need to add JWT authentication while continuing work on another feature:
# Create auth workspace
r2r eac work create feature/add-jwt-auth
# Move to new workspace
cd ../simply-cli-feature-add-jwt-auth
# Verify isolation
git branch
# * feature/add-jwt-auth
# Start coding
code .
Common Issues
| Problem | Solution |
|---|---|
| "Branch already exists" | Use different branch name or delete old branch |
| "Worktree path exists" | Choose custom path with --path flag |
| Uncommitted changes | Commit or stash changes before creating workspace |
Next Steps
- Make Commits with AI → Commit your changes
- Merge Workspace Changes → Merge back to main
Related Commands
work create- Full command referenceshow workspaces- List all workspaceswork remove- Delete workspace
Tutorials | How-to Guides | Explanation | Reference
You are here: How-to Guides — task-oriented recipes that guide you through solving specific problems.