E2B icon

E2B

Run commands and manage E2B sandboxes and snapshots

Git → Status

AI-generated

Summary

Retrieve the git status of a repository inside a specified E2B sandbox directory, returning a parsed status overview including branch info and file changes.

Inputs

  • Sandbox ID (required) — ID of the sandbox to work with
  • Repository Path (required) — Path to the git repository inside the sandbox
  • Timeout — Timeout in seconds for the E2B operation, defaults to 300 seconds

Output shape

a single JSON object containing the sandbox ID, repository path, and detailed parsed git status information

The git status data includes current branch, upstream, ahead/behind counts, detachment state, and file statuses such as staged, untracked, and conflicts. An error is thrown if the command fails.

Links

Discussion