Merge changes from tasks
After a task is complete and you’ve verified the changes, you need to integrate them into your codebase. Rover provides flexible options to fit your workflow. This guide shows you how to merge changes directly or push them to a remote repository.
Understanding integration options
Section titled “Understanding integration options”Rover does not dictate how you should work with git—it helps you with your own workflow. You can choose to:
- Merge directly: Integrate changes immediately into your current branch
- Push to remote: Push the task branch to your remote repository for code review and pull requests
- Manual integration: Use standard git commands within the task workspace for custom workflows
Merge changes directly
Section titled “Merge changes directly”Merge a completed task branch directly into your current branch.
Merge proposed changes to the current branch
- 1
List tasks to confirm the task is in completed status
Terminal window rover list - 2
Merge the task branch into your current branch
Terminal window rover merge 1
This command merges all commits from the task branch into your current branch. After merging, you can push your branch to the remote as you normally would.
Push to remote repository
Section titled “Push to remote repository”Push the task branch to your remote repository, making it available for creating pull requests or sharing with your team.
Push branch to the remote
- 1
List tasks to find the task ID you want to push
Terminal window rover list - 2
Push the task branch to the remote repository
Terminal window rover push 1If there are remaining uncommitted changes, you will be asked whether you want to commit them.
After pushing, you can create a pull request using your repository hosting platform’s interface (GitHub, GitLab, Bitbucket, etc.).
Verify before integrating
Section titled “Verify before integrating”Before merging or pushing, always verify that the changes meet your requirements:
- Review the diff: Use
rover diff <task-id>to see all changes - Test the code: Use
rover shell <task-id>to test in the task workspace - Check the build: Run tests and build commands to ensure everything works
- Inspect iterations: Use
rover inspect <task-id>to review the agent’s work
Clean up after integration
Section titled “Clean up after integration”After successfully merging or pushing a task, you can clean up the task workspace:
rover delete 1This removes the task folder and its associated git worktree, freeing up disk space.