How To Use Git Version Control In cPanel?

To use the git version control in the cPanel, first, you must create the Git Repository. Please be informed that you will need shell access or root access to create the Git Repository.

Follow the steps to create the Git Repository:

  1. Log in to the server using SSH as a root user.
  2. # ssh root@serverIP

  3. After login, create a new directory in the cPanel user to store the Repository. Run the below command to create the new directory.
  4. # mkdir -p ~/demo/example

  5. Navigate to the directory using the below command.
  6. # cd ~/demo/example

  7. Once you have navigated to the directory(example), you will have to initialize the directory(example) as a Git Directory using the below command.
    # git init
    whm mkdir terminal
  8. The directory will be initialized as Git Repository, as shown below.
    whm git init

Steps to add a directory in Git Version Control:

  1. Login to the cPanel.
  2. Under the Files section, click on Git Version Control.
    wwhm git version control
  3. On the new page, click Create button.
    whm git version create res
  4. Once the below page opens, disable Clone a Repository shown in the below screenshot.
    whm git clone disable
  5. Once you click on the toggle button, you will see the page below. Add the path to create the Git Repository and name, then click the Create button.
    whm git create

Steps to Clone a Repository in Git Version Control:

  1. Login to the cPanel.
  2. Under the Files section, click on Git Version Control.
    whm git version control
  3. On the new page, click Create button.
    whm git version control create resp
  4. Once you click on the Create button, you will see the below screen.
    whm git version control clone create

    • Under Create Repository section, enable Clone a Repository.
    • Clone URL: Here, you will have to paste the path of the existing Git Repository.
      Note: Please be informed that the cloned Repository has its path.
    • Repository Path: Enter the path to create a Repository.
    • Repository Name: Enter the name of the Repository.
    • Click on the Create button shown in the screen capture.

Now, the cloned Repository for your cPanel account is created.

Thant’s It! you can now use Git Version Control In cPanel.

If you enjoyed this tutorial, then you would love our support! All Kemuhost hosting plans include 24/7 support from our amazing support team. Check out our web hosting plans and have your website migrated for free today!

Add a Comment

Your email address will not be published. Required fields are marked *