How to use Git version control in cPanel

Git is one of the popular and most used version control and it was first of its kind. Because of its popularity and demand cPanel (a web-based hosting control panel) finally integrated this functionality. It is not available to all, you can use it only if your hosting provider has updated the WHM and enabled the Git version control option if, you are using shared hosting. Else, if you have as VPS hosting and you have the control to access WHM you have the permission to install and enable to cPanel.

In here, you can create a new repository or you can clone the existing repository which you have in GitHub or anywhere else. First, we will check how to create a new repository.

How to create new Repository in cPanel

Follow steps as shown below

git create repo
Create Repository

Note: While creating the repository be very careful about creating a repository in a directory that already contains files. If for some reason, you delete the repository from cPanel, the whole directory will be erased! , so be careful.

  1. Select Git Version Control under Files
  2. Click Create (if you haven’t created any repositories yet, you’ll be skipped ahead to the next step automatically)
  3. Turn off the Clone a Repository switch.
  4. Fill in the file path to the new repository
  5. Provide a name for the repository as it will appear in your cPanel interface
  6. Click Create at the bottom

How to “Clone” a Existing Git Repository in cPanel

Follow the steps below to clone.

git clone repo
Clone Repository
  1. Select Git Version Control under Files
  2. Copy the clone URL into the Clone URL (ex: GitHub, bitbucket or any other personal repository)
  3. Fill in a file path for the repository (remember the cloned repository provides its own directory)
  4. Fill in a name for the repository as it will appear in your cPanel interface
  5. Click Create
Also Read:  How to enable domain to send mail through PHP mail() script in CPanel

If you have any queries about this article please leave your queries in the comment section below, so enjoy Git in Cpanel.

For More Info you can check this cPanel official article by clicking here

Related Article: How to enable domain to send mail through PHP mail() script in CPanel