How to Use Git Version Control in cPanel

cPanel is a web hosting control panel developed by cPanel, L.L.C., an American corporation. The software provides a graphical interface and automation tools designed to simplify the process of hosting a web site to the website owner or the “end user”. 

Do all of your Git stuff right from within your hosting account? Yes. With cPanel you can now host a private or public repository without paying premium costs to third party Git hosting services like GitHub or BitBucket.

While Git Version Control is available in all of our hosting accounts, we’d recommend a VPS or Dedicated hosting package, so you can exercise more control over individual shell user privileges. This is especially important if you plan on having other users access your Git repository.

How to Create a Git Repository with cPanel

If you’re creating a repository for the first time, you’ll be prompted to fill in the necessary fields right away. Otherwise, you’ll just need to click the blue Create button. These steps are detailed below:

  1. Log into cPanel
  2. Select Git Version Control under Files
  3. Click Create (if you haven’t created any repositories yet, you’ll be skipped ahead to the next step automatically)
  4. Toggle off the Clone a Repository button
  5. Fill in the file path to the new repository
  6. Provide a name for the repository as it will appear in your cPanel interface
  7. Click Create at the bottom

How to “Clone” a Git Repository in cPanel

Instead of creating your own Git repository, you can “clone” a repository that already exists out on the Web: for example, from the popular Git hosting site GitHub.

  1. Log into cPanel
  2. Select Git Version Control under Files
  3. Copy the clone URL into the Clone URL
  4. Fill in a file path for the repository (remember the cloned repository provides its own directory)
  5. Fill in a name for the repository as it will appear in your cPanel interface
  6. Click Create

Now you have successfully cloned a repository into your hosting account. This is a great way of cloning in a homepage you may have under version control at a different location or just a repository of various scripts or assets you may need for a project.

Why Create a Git Repository in cPanel

It’s true that you can launch your own repository wherever you have Git installed. However, cPanel makes the process much easier by creating the repository and the necessary executable files to save and launch your project right away.

Manage Projects With Ease

We’ve gone into some depth explaining how Git works in our Git tutorial series. But if you want a closer look to see how Git can work for you, you can now easily set up a Git repository with any of our cPanel hosting accounts.

Helpful Commands Delivered

cPanel gives you the essential commands you’ll need to get started the instant you’ve created your repository.

Let us Know What You Think

Have you been using Git for a long time, or you just getting started?

We’re excited that our hosting customers can now easily set up and use Git repositories from within cPanel. If you have troubles along the way, be sure to leave a comment and let us know.