How to Use Git Version Control in cPanel? Print

  • 0

To use the git version control in the cPanel, you must create the Git Repository first. Please be informed that to create the Git Repository, you will need shell access/root access. Therefore, please follow the below steps to create the Git Repository.

  1. Login to the server using SSH.

    # ssh [email protected]

  2. Once you log into the server, you will have to create a new directory to store the Repository. Run the below command to create the new directory.

    # mkdir -p ~/accu/example



  3. Once the directory has been created, you will have to navigate to that directory. Run the following command to navigate to the directory.

    # cd accu/example




  4. 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



  5. Once you fire the above command, the directory will be initialized as Git Repository, as shown below.



    Now, you will have to add the above directory in cPanel. We have provided the steps below.

    Note: To add, create the Git Repository in the cPanel. The cPanel user should have access to the home directory.

  1. Login to the cPanel.

  2. Click on Git Version Control under the file section.



  3. Once you click Click on the "Git Version Control," you will see the below page, then click on the "Create button."



  4. Once the below page opens, click on the toggle button beside "Clone a Repository," as shown in the below screen capture. Once you click on the toggle button, you will see the page as below. First, you will have to add the path to create the Git Repository and name, then click on the "create" button.



    You can clone the existing directory as well. We have provided the steps below to clone the GIt Repository.
  1. Login to the cPanel.

  2. Click on Git Version Control under the file section.


  3. Click on the "Create" button as shown in the below screen capture.



  4. Once you click on the "Create" button, you will see the below screen

    .
    • Here, you will have to paste the path of the existing Git Repository.
      (Note: Please be informed that the cloned Repository has its path.)
    • Enter the name of the Repository.
    • Click on the "Create" button shown in the screen capture.
    Now, the cloned Repository for your cPanel account has been created.

Was this answer helpful?

« Back
Sign up for a newsletter

chat