Git Integration
Last updated:
Full git support inside WebSandbox — clone, commit, push, pull, branching, and diff view, powered by isomorphic-git.
Overview
The git panel is accessible from the left sidebar (the branch icon). It shows the current branch, staged changes, unstaged changes, and a list of recent commits. All standard git operations are supported:
- Clone from any HTTPS remote
- Stage and unstage files
- Commit with a message
- Push to and pull from remotes
- Create, switch, and delete branches
- View file diffs inline
- Resolve merge conflicts
Cloning a Repository
When creating a new workspace, choose From Git URL in the template picker and paste any public HTTPS repository URL. WebSandbox will:
- Clone the repository via HTTPS (using the CORS proxy for browser compatibility)
- Persist the full git object store to IndexedDB so your history and refs survive page refreshes
- Detect the project type and suggest running
npm installautomatically
For private repositories, you must supply a Personal Access Token (see Authentication).
Committing Changes
Open the git panel and you will see modified files listed under Changes. Click the + icon next to a file to stage it, or click Stage All. Enter a commit message in the text field and press Commit.
WebSandbox uses your account name and email as the git author identity. You can override these in workspace settings.
Push & Pull
Use the Sync button (↑↓ arrows) in the git panel header to push local commits to the remote and pull any new remote commits. WebSandbox performs a fetch first and notifies you of any divergence before pushing.
All git over-the-wire communication uses HTTPS. The platform routes requests through a CORS-compatible proxy (cors.isomorphic-git.org) to bypass browser CORS restrictions on git protocol endpoints.
Branching
The current branch name is displayed in the status bar at the bottom of the editor. Click it to open the branch picker:
- Switch branch — select any local or remote branch
- Create new branch — type a name and press Enter; optionally check out from the current HEAD or a specific commit
- Delete branch — right-click a branch in the list
Diff View
Click any modified file in the git panel to open a side-by-side diff view in the editor. The diff view shows:
- Added lines highlighted in green
- Removed lines highlighted in red
- Unchanged context lines in the normal editor colour
- Inline edit capability — you can make edits directly in the diff view and they are reflected in the working file
Authentication
To push to or clone from a private repository, WebSandbox requires a Personal Access Token (PAT). To configure authentication:
- Go to Settings → Git Authentication
- Add your GitHub / GitLab / Bitbucket PAT with
repo(read/write) scope - WebSandbox stores the token encrypted in your account — it is used automatically for all git remote operations
Tokens are never sent to external services directly — they are passed to isomorphic-git's HTTP layer, which adds them as Authorization: Basic headers on clone/push/pull requests through the CORS proxy.