# Repository Management

GIT Management / Repository Management

## Create Git repository

 - [GET /VersionControl/create](https://api.docs.cpanel.net/specifications/cpanel.openapi/repository-management/versioncontrol::create.md): This function creates a new Git™ repository on a cPanel account.

* For more information about support for version control in cPanel & WHM, read our
Git Version Control and
Guide to Git documentation.
* For a list of configuration changes, repository restrictions, and troubleshooting steps,
read our Guide to Git - For System Administrators documentation.

Important:

The system logs errors for this function in the ~/.cpanel/logs/vc_TIMESTAMP_git_create.log
file, where TIMESTAMP represents the time of the error in Unix epoch time.

## Delete Git repository

 - [GET /VersionControl/delete](https://api.docs.cpanel.net/specifications/cpanel.openapi/repository-management/versioncontrol::delete.md): This function deletes a cPanel account's Git™ repository. For more information about
support for version control in cPanel & WHM, read our
Git Version Control and
Guide to Git documentation.

Warning:

* When you call this function, the system permanently deletes the entire contents
of the specified directory. You cannot recover this data after deletion.
* You cannot use this function to delete any repositories that do not appear in
the cache of repositories (for example, repositories that contain invalid characters or
exist within cPanel-controlled directories).

## Return Git repositories

 - [GET /VersionControl/retrieve](https://api.docs.cpanel.net/specifications/cpanel.openapi/repository-management/versioncontrol::retrieve.md): This function lists Git™ repositories on a cPanel account. For more information
about support for version control in cPanel & WHM, read our
Git Version Control and
Guide to Git documentation.

Important:

* This feature does not allow the following characters in repository paths:
  `\ * | " '  & @  $ { } [ ] ( ) ; ? : = % #`
* This function does not allow repositories that exist in the following
cPanel-controlled directories:

  * .cpanel
  * .htpasswds
  * .ssh
  * .trash
  * access-logs
  * cgi-bin
  * etc
  * logs
  * perl5
  * mail
  * spamassassin
  * ssl
  * tmp
  * var`

Users can create repositories in some of these directories on the command line.
They may appear in the list of repositories in Gitweb, but users may see an error
message if they try to access them.

## Update Git repository settings

 - [GET /VersionControl/update](https://api.docs.cpanel.net/specifications/cpanel.openapi/repository-management/versioncontrol::update.md): This function modifies a Git™ repository's basic settings. For more information about support
for version control in cPanel & WHM, read our
Git Version Control
and Guide to Git documentation.

Note:

* This function only pulls changes from the remote repository if you specify a branch value.
* You cannot modify the type, repository_root, or url values for existing repositories.
* You must include the repository_root parameter in order to identify the repository to
update.
* All other input parameters are optional. Use them to assign the new values to the
account. If you do not include a parameter or specify its existing value, no change will occur.

