Git keeps the history of your code and lets you update your site from a repository instead of uploading files by hand. cPanel has a Git Version Control tool for this.
Create or clone a repository
- In cPanel open Git Version Control in the Files section and click Create.
- To copy an existing repository, switch on Clone a Repository and paste its address in Clone URL. To start an empty one, leave it off.
- Choose the Repository Path, which is the folder on your account, and a Repository Name.
- Click Create.
Pull updates
Open the repository with Manage, then the Pull or Deploy tab, and click Update from Remote. This brings in the newest changes from your remote repository.
Deploy to your website
The repository folder is not always the folder your website is served from. To copy the files to the live site, the repository needs a .cpanel.yml file that lists the deployment tasks. Commit it to your remote repository, pull, then click Deploy HEAD Commit. Need a hand writing it? Contact us.
Limits and cautions
- The clone address must not contain a username and password. Private repositories need SSH key access, which may need shell access on your account.
- The target folder must be empty when you clone into it.
- Do not edit the hidden .git folder.
- Deployment fails if the working tree has uncommitted changes. Make changes in your own Git workflow, not directly on the server.
- Removing a repository in cPanel does not delete its files from the account.
- Repository paths cannot use special characters or spaces.
Before big deployments, take a backup. See how to back up and restore your website. For WordPress sites, also see managing WordPress with WP Toolkit.

