Tip: Start typing in the input box for immediate search results.
- Show all articles ( 1 ) Collapse Articles
- Show all articles ( 2 ) Collapse Articles
- Articles coming soon
Update or Deploy a Git Repository – cPanel
0 out of 5 stars
Learn how to Update or Deploy a Git™ Repository using cPanel. The Git™ Version Control feature allows you to host Git repositories on your cPanel account. You can use Git to maintain any set of files (for example, a website’s files and assets, a software development project, or simple text files). More information.
Make sure that your cPanel account includes shell access. Without shell access, you can only create, clone, delete and view repositories.
If you are using your local machine SSH, make sure that you have created an SSH public_key and have added it to your cPanel server.
Video tutorial – Update or Deploy a Git Repository
Step-by-step tutorial – Update or Deploy a Git Repository
- Log in to cPanel.
- Git Version Control
In the Repositories’ table list, choose the Repository and click the Manage button.
- Basic Information tab
— The repository’s directory. Click to open the directory for the repository in cPanel’s File Manager interface (cPanel >> Home >> Files >> File Manager) in a new browser tab.
— The repository’s display name. To modify this name, enter the new name and click Update.
— The currently checked-out local branch. To check out a different branch, select the desired branch and click Update.
If you select a different branch, the system will automatically pull changes from the remote repository when it checks out that branch.
If the repository is a bare repository, the system will not display this information.
Currently Checked-Out Branch
— The currently checked-out local branch. Click to open the Gitweb interface in a new browser tab.
— This section of the interface displays information about the active branch’s HEAD commit (the most recent commit to the branch). If the repository does not include any commits for the current branch or is a bare repository, the system will not display any
HEAD Commit information.
Commit — The SHA-1 value for the HEAD commit.
Author — The HEAD commit’s author.
Date — The date of the HEAD commit.
The commit message for the HEAD commit.
— Click to open the Gitweb interface in a new browser tab. Gitweb allows you to browse the repository and view its history and contents.
— The URL of the repository’s remote repository.
— The URL to use to clone the repository to another location (for example, your local computer, another cPanel account, or a GitHub account). Click Copy to copy this URL to your clipboard.
Click the Pull or Deploy tab.
- Pull or Deploy tab
Click the Update from Remote button to pull changes from the remote repository and apply them to the cPanel-managed copy of the repository. The system pulls changes with the
--ff-onlyoption and will only succeed if the branch’s HEAD commit is up-to-date or Git can fast-forward it.
Click the Deploy HEAD Commit button to deploy changes from the cPanel-managed repository. Deployment requires a
.cpanel.ymlfile and at least one local or remote branch.
The system runs the tasks that you configure in the
.cpanel.ymlfile in order to deploy the repository.
We strongly recommend that you check the
.cpanel.ymlfile in to your remote repository and not the cPanel-managed repository.
The system cannot deploy changes for repositories with dirty working trees.
- Wait for the success message.
- Repository Path
Click the Repository Path button to open the directory for the repository in cPanel’s File Manager interface (cPanel >> Home >> Files >> File Manager) in a new browser tab.
- The repository’s directory