How do you Manage GIT Repository Configuration on cPanel Accounts?
Posted by Allura on 19 03 2019.
One can navigate to (cPanel >> Home >> Files >> Git™ Version Control) to work on this feature.
The Git™ Version Control feature helps one to easily host Git repositories on one’s cPanel account. One can make a use of Git to maintain any set of files (like, a website’s files and assets, a software development project, or simple text files). One can read our Guide to Git documentation and Git’s documentation to gather more information on this.
One can click on Manage to modify or deploy repositories and then click on Basic Information in order to view repository information, or click on Pull or Deploy to pull or deploy changes.
- Repository Path: This is the repository’s directory. Navigate to cPanel’s File Manager interface (cPanel >> Home >> Files >> File Manager) to work on this.
- Repository Name: This is the repository’s display name. One can enter the new name and click on Update in order to modify this name.
- Checked-Out Branch: This is the currently checked-out local branch. To work on this, kindly select the desired branch and click on Update. If selected, the system will automatically pull changes from the remote repository while checking out that branch, and if its a bare repository, then the system will not display this information.
- Currently Checked-Out Branch: This is the currently checked-out local branch. Click in order open the Gitweb interface in a new browser tab. In case its a bare repository, the system will not display this information. One can read our Gitweb documentation for more information.
- HEAD Commit: This section of the interface will display these information about the active branch’s HEAD commit: SHA-1 value for the HEAD commit, HEAD commit’s author, date of the HEAD commit and the commit message for the HEAD commit.
- Remote URL: URL of the repository’s remote repository.
- Clone URL: Clone the repository to another location (like, one’s local computer).
Pull or Deploy
While items like Repository Path, Currently Checked-Out Branch, Head Commit and Remote URL are same as discussed above, few items are new to this list.
Last Deployment Information: Displays information like date of last deployment, SHA-1 value for deployed commit, deployment commit’s author, date of deployed commit and commit message for the deployed commit.
Update From Remote: Click in order to pull changes from the remote repository. Apply them to the cPanel-managed copy of the repository. The system will thereafter pull changes with the –ff-only option. This will be successful if the branch’s HEAD commit is up-to-date or Git can make it to fast forward.
Deploy HEAD Commit:
- Configure the tasks in the .cpanel.yml file to deploy repository.
- Check the .cpanel.yml file in remote repository and not in cPanel-managed repository.
- System fails to deploy changes for repositories with dirty working trees.
One can read our Guide to Git – Deployment and Guide to Git – How to Set Up Deployment documentation for more information.
All valuable information and related information on GIT repository has been outlined in this article.