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:
- Log in to the server using SSH as a root user.
- After login, create a new directory in the cPanel user to store the Repository. Run the below command to create the new directory.
- Navigate to the directory using the below command.
- 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
- The directory will be initialized as Git Repository, as shown below.
# ssh root@serverIP
# mkdir -p ~/demo/example
# cd ~/demo/example
Steps to add a directory in Git Version Control:
- Login to the cPanel.
- Under the Files section, click on Git Version Control.
- On the new page, click Create button.
- Once the below page opens, disable Clone a Repository shown in the below screenshot.
- 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.
Steps to Clone a Repository in Git Version Control:
- Login to the cPanel.
- Under the Files section, click on Git Version Control.
- On the new page, click Create button.
- Once you click on the Create button, you will see the below screen.
- 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!