Files
GIT Version Control
Updated: 09 February 2024Understanding how to use the GIT version control menu on cPanel can significantly streamline your web development process. This tutorial will guide you through the necessary steps on how to use this helpful tool.
Accessing GIT Version Control in cPanel
- Log into your cPanel account.
- Scroll down to the Files section.
- Click on the GITâ„¢ Version Control icon.
You will now be able to view the GIT Version Control menu.
Creating a New Repository
- Click on the Create button located in the top-right corner of the 'GIT Version Control' page.
- Under Clone URL, select Yes if you want to clone an existing repository. If you're starting from scratch, select No.
- Enter the desired directory for your repository in the Repository Path field.
Notes
- If the folder you specified isn't there, the system will create it.
- If there's already a repository in the folder you specified, the system will include it in the cPanel's list of repositories.
- You cannot create, delete or view repositories that have the following characters: \ * | " ' < > & @ ` $ { } [ ] ( ) ; ? : = % #`
- You cannot create, delete or view repositories in the following folders:
- .cpanel
- .trash
- etc
- ssl
- tmp
- logs
- .cphorde
- spamassassin
- .htpasswds
- var
- cgi-bin
- .ssh
- perl5
- access-logs
- If you're not adding an already existing repository, the folder must be empty. Folders for subdomains have a "cgi-bin" folder and might also have a ".well-known" folder. You need to move these out of the way before you can set up a repository there.
- Choose whether you want the repository to be public or private.
- In the Repository Name field, enter the desired name for the repository.
- Click Create at the bottom of the page to finalize your new repository.
Managing an Existing Repository
To manage an existing repository, click on the Manage button next to the repository you want to change.
Updating a Repository
- Click on the Pull or Deploy tab.
- Select the branch you want to update from the Branch dropdown menu.
- Click Deploy to update your repository.
Deleting a Repository
- Click on Remove button on the right of the repository you want to delete.
- A confirmation message shows up. Click Remove again to delete the repository.
IMPORTANT!
When you stop using cPanel to control a repository, you won't see it in cPanel anymore, and you can't deploy it with cPanel. However, cPanel won't remove the folder or the data of the repository. To completely get rid of the repository data, you need to either use cPanel's File Manager (go to cPanel, then Home, then Files, and then File Manager) or any other way you like to delete the files yourself.