pushToBranch
Push code changes to a branch.
Method signature
Description
Pushes the current code changes from the sandbox environment to a specified Git branch. This method is useful when you want to save your generated code changes to a branch without creating a pull request.
Parameters
The name of the branch to push changes to. If not provided, pushes to the current active branch or the default branch configured in the agent.
Return value
Returns a Promise<void>
that resolves when the push operation completes successfully.
Usage example
Notes
- This method requires that the VibeKit instance is configured with GitHub credentials
- The branch must exist in the repository, or the agent must have permissions to create it
- Changes are pushed directly without creating a pull request - use
createPullRequest()
if you want to create a PR instead - This operation is available for both Codex and Claude agents
Related methods
createPullRequest()
- Create a pull request with the current changesgenerateCode()
- Generate code changes before pushing