Skip to content
+2 (02) 20824060+2 012 77002700Pay in EGP: Fawry · InstaPay · Cards

How to Use Git Version Control in cPanel

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

  1. In cPanel open Git Version Control in the Files section and click Create.
  2. 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.
  3. Choose the Repository Path, which is the folder on your account, and a Repository Name.
  4. 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

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.

Need help choosing?Tell us about your project and we will recommend the right solution.
Contact us