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
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.
- Select Git Version Control under Files
- Click Create (if you haven’t created any repositories yet, you’ll be skipped ahead to the next step automatically)
- Turn off the Clone a Repository switch.
- Fill in the file path to the new repository
- Provide a name for the repository as it will appear in your cPanel interface
- Click Create at the bottom
How to “Clone” a Existing Git Repository in cPanel
Follow the steps below to clone.
- Select Git Version Control under Files
- Copy the clone URL into the Clone URL (ex: GitHub, bitbucket or any other personal repository)
- Fill in a file path for the repository (remember the cloned repository provides its own directory)
- Fill in a name for the repository as it will appear in your cPanel interface
- Click Create
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
Arjun is a Full-stack developer, who is fond of the web. Lives in Chikmagalur, Karnataka, India