Using Git Version Control in cPanel

Git is a type of version control system (VCS) that makes it easier to track changes to files. For example, when you edit a file, git can help you determine exactly what changed, who changed it, and why. To learn more, see Getting Started - What is Git?

If you’re a developer who uses Git, you might be surprised to learn that repositories can be created and managed right within cPanel. This article will walk you through this simple process.

The procedure applies to the following plans:

To perform the steps below, you must first check the following:

  • Shell Access needs to be enabled for your cPanel account (see How to Connect by SSH to the Server).
  • You must register your public key in cPanel’s SSH Access interface (Security > SSH Access) and authorize it for SSH access.

How to Create a Repository with cPanel

  1. Log in to your cPanel
  2. Select Git Version Control, located under FilesGIT in cPanel
  3. To create a repository, click the Create button GIT in cPanel
  4. If you’d like to clone an external repository, ensure Clone a Repository is toggled to on. Then add the desired file path to the Clone URL field. The remaining fields will be filled out automatically.GIT in cPanel
  5. To create a new repository, ensure Clone a Repository is toggled off. Then add a repository path and provide a name (as it will appear in cPanel).GIT in cPanel
  6. Click the Create button and your repository will be created. You will then be redirected to a screen containing several useful commands that will assist you in either connecting your repository to an existing project or using the repository to start a new project.

The repository will now be listed in cPanel, under the Files > Git Version Control:

GIT in cPanel

Click on the Manage button to manage your repository:

GIT in cPanel

And you’re done!

Was this answer helpful?