How to Use Git Version Control in cPanel
cPanel includes Git Version Control, which lets you keep your site's code in a proper Git repository and deploy changes cleanly — no more dragging files over FTP and hoping you got everything. If you work with code, this is a much calmer way to manage a site.
What you can do with it
- Clone an existing repository (from GitHub, for example) straight onto your hosting.
- Create a new repository from files already on the server.
- Pull and deploy updates with a defined deployment step.
Step 1: Open Git Version Control
- Log in to cPanel.
- Under the Files section, click Git Version Control.
- Click Create to start a new repository.
Step 2: Clone or create
To pull in an existing project, toggle Clone a Repository on and paste the repo URL (for private repos you will need to add an SSH key first — see setting up SSH key authentication). To version files already on the server, leave cloning off and point the repository at your existing directory.
Set the Repository Path (where files live) and a friendly name, then click Create.
Step 3: Deploy changes
cPanel reads a .cpanel.yml file in your repository to know how to deploy. After pushing new commits, open the repository in cPanel, go to the Pull or Deploy tab, click Update to fetch changes, then Deploy HEAD Commit to publish them live.
Frequently asked questions
Do I need to know Git commands?
The cPanel interface handles the basics with buttons, but a little Git knowledge helps. You can also work over SSH and run Git commands directly if you prefer the command line.
Can I auto-deploy on every push?
The deployment step is manual by default for safety, but with the .cpanel.yml file and a push workflow you can build an automated pipeline. For complex CI/CD, a VPS gives you more freedom.
Is this a substitute for backups?
No. Git tracks your code, not your database or uploads. Keep taking full backups too — see taking a full website backup.
Was this article helpful?