> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sandywp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Git deployment

> Deploy a plugin, theme, or wp-content folder from a Git repository into a SandyWP sandbox.

Connect a repository to deploy a plugin, theme, or `wp-content` folder into a sandbox. You can deploy manually or on every push to a selected branch.

<img src="https://mintcdn.com/sandy-wp/QrIaogrIPttSMHEN/images/docs/git.png?fit=max&auto=format&n=QrIaogrIPttSMHEN&q=85&s=23156a05a92bde3cc16a88248ec6ae35" alt="The Git Deployment panel on the sandbox detail page" width="1396" height="1047" data-path="images/docs/git.png" />

## Connect a repository

Open **Site settings**, select **Git Deployment**, and choose **Add repository**.

<img src="https://mintcdn.com/sandy-wp/QrIaogrIPttSMHEN/images/docs/connect-repo.png?fit=max&auto=format&n=QrIaogrIPttSMHEN&q=85&s=3b72e70124da48659c7d72f4679276a3" alt="The Connect repository form for Git Deployment" width="1000" height="750" data-path="images/docs/connect-repo.png" />

| Field               | What to choose                                                                    |
| ------------------- | --------------------------------------------------------------------------------- |
| Access              | **Public** for an HTTPS repository URL, or **Private (SSH)** when it needs a key. |
| Repository URL      | An HTTPS URL for public repositories, or an SSH URL for private repositories.     |
| Branch              | The branch to deploy; it defaults to `main`.                                      |
| Destination         | Plugin, Theme, or `wp-content` folder.                                            |
| Folder name         | The target folder under the selected destination.                                 |
| Auto-deploy on push | Deploy the configured branch from a webhook.                                      |

The destination decides where files land: `wp-content/plugins/<folder>`, `wp-content/themes/<folder>`, or `wp-content/<folder>`. That destination folder is fully managed by Git, so files removed from the repository are removed on the next deploy.

## Private repositories

SandyWP generates a read-only deploy key when you connect a private repository. Add its public key to the repository host as a deploy key, then use the connection card to copy it again when needed.

## Deploy automatically or manually

For auto-deploy, add the supplied webhook URL to your repository host with JSON content and push events. Every push to the selected branch triggers a deployment.

Select **Deploy now** to pull and sync the latest commit manually. The repository card shows the last deployed commit and deployment history.

Disconnecting removes only the repository connection; files already deployed stay in the sandbox. Use [GitHub PR previews](/guides/github) for an ephemeral, exact-commit pull-request environment instead.
