Git Manager

Updated 14 Nov 2026 Published

Git Manager

Git Manager turns a website's document root into a Git working copy that you control from the panel: clone a repository, pull new commits, switch branches, run build steps after every pull and deploy automatically on every push, all without SSH. It is a built-in app, so it is ready on every server.

Git Manager has no sidebar entry because it always works on one website. Open it from the site: Websites → your site → tab Advanced → Version Control → Git Manager (/websites/<user>/<domain>/git/).

Note

Hosting users can use Git Manager only if their hosting plan has Allow Git Deployment turned on (see Hosting Plans). Every Git command runs as the site's owner, on the server that hosts the site — never as root. A site without an owner cannot pull or deploy until you assign one.

Git Manager page of a website showing branch, remote, last commit, the Pull and Fetch buttons and the SSH deploy key

Step 1: Add a deploy key (private repositories)

For a private repository the server needs SSH access to it.

  1. In Git Manager press Generate SSH Key. If the site's user already has a key, it is kept.
  2. Copy the public key and add it as a deploy key in GitHub, GitLab or Bitbucket.

Public repositories can be cloned over HTTPS without a key. If an SSH clone of a public repository fails, Git Manager offers Retry with HTTPS.

Step 2: Clone the repository

  1. Under Clone Repository enter the Repository URL and, optionally, a Branch (for example main). Only https://, ssh:// and git@host:path URLs are accepted, for example [email protected]:you/site.git.
  2. Press Clone Now.
  3. If the document root already contains files, you choose how to continue:
    • Overlay (fetch + reset) — the repository is applied on top of the existing directory and the branch is checked out.
    • Replace (delete all + clone) — the directory is emptied and cloned fresh.

Prefer to start from scratch? Initialize Empty Repo (button git init) creates an empty repository in the site root.

Tip

The repository lives inside the document root, so Git Manager blocks web access to /.git after every clone, init and deploy: a deny rule on Nginx sites, and a .git/.htaccess on Apache2 and OpenLiteSpeed sites. Your source code, history and any token in the remote URL are not served.

Step 3: Day-to-day work

  • Pull — starts a deploy: git pull, then your post-deploy commands (see below). The output is shown live and the page reloads when it succeeds.
  • Fetch — update remote branches without changing your files.
  • Branch — switch to another branch (fetch first if a branch is missing).
  • Remote — change the origin URL.
  • Log — open the Commit History (hash, author, date, message).
  • Discard Changes — shown when there are local edits; throws them away.

Step 4: Deploy settings

Once the site is a repository, the Deploy card appears for the site's owner and administrators.

  • Post-deploy commands — one command per line, for example composer install --no-dev, npm ci && npm run build or php artisan migrate --force. They run in the site folder as the site's account after every pull (the Pull button and the webhook) and after a rollback. Up to 20 commands of at most 500 characters each. A failing command stops the deploy and marks it failed.
  • Deploy history — time, trigger (manual, webhook or rollback), the commit before and after, the result and the end of the output. The last 30 deploys are kept.
  • Rollback — in the Commit History, the rollback button on a commit (Deploy this commit) runs git reset --hard to that commit and then the post-deploy commands. Uncommitted changes to tracked files are discarded; untracked files are kept.

A deploy runs in the background and is stopped after 30 minutes. Only one deploy per site runs at a time.

Push-to-deploy webhook

The Auto-deploy Webhook card deploys the site automatically whenever you push to its branch.

  1. Press Enable. You get a Payload URL (/git-manager/webhook/<token>/ on your panel) and a Secret. The secret is shown only once, so copy it now.
  2. Add a push webhook in your Git host with that URL, content type application/json, and the secret (GitHub Secret, GitLab Secret token).
  3. Push to the deployed branch. The panel runs the same deploy as the Pull button.
  • GitHub pushes are checked with their HMAC-SHA256 signature and GitLab pushes with the secret token. Bitbucket signs nothing, so there the unguessable URL is the only protection.
  • Only a push to the branch the site is on deploys. Pushes that arrive within 10 seconds of the last one are collapsed into a single deploy.
  • When a webhook deploy fails, the site owner gets a notification with the end of the output.
  • The regenerate button makes a new URL and secret; the old ones stop working. If the owner's plan no longer allows Git, the webhook is refused.
  • Your panel must be reachable from the internet for the Git host to call it.
Tip

After a successful deploy, background workers of the site marked Restart after a deploy in Supervisor are restarted, so they run the new code (see Supervisor workers). Python, Node.js and Go apps have their own Git tab on their deploy page, which also installs dependencies, builds and restarts the app — see Deploying Django, Deploying Node.js Apps and Go deployment.

On this page