---
title: "Update Git repository settings"
method: GET
path: "/VersionControl/update"
tags: ["VersionControl", "Repository Management"]
---

# Update Git repository settings

`GET /VersionControl/update`

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](https://go.cpanel.net/GitVersionControl)
and [Guide to Git](https://go.cpanel.net/GitDeployment) 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.

## Query parameters

- `repository_root` string, path, required
- `branch` string
- `name` string

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `available_branches` string[] — A list of local and remote branches available for the cloned or existing repository. * An empty array, if no branches exist. * `null` — The repository is a bare repository.
      - `branch` string, nullable — The repository's current branch. * `null` — The system has not finished the clone process for the repository, no local branches exist, or the repository is a bare repository.
      - `clone_urls` object — An object containing the URLs to use to clone the repository. The function returns an empty object if the account does **not** include the *Shell Access* setting. **Important:** If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number.
        - `read_only` string[] — A list of clone URLs with read-only permissions. This function returns an empty list if the account does **not** include the *Shell Access* setting. **Important:** If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number.
        - `read_write` string[] — A list of clone URLs with read-write permissions. This function returns an empty list if the account does **not** include the *Shell Access* setting. **Important:** If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number.
      - `deployable` 1 | 0 — Whether the system could deploy the repository. * `1` — Can deploy. * `0` — Cannot deploy.
      - `last_deployment` object, nullable — An object containing information about the commit that the system most recently deployed. **Note:** If no deployment information exists, the function returns a `null` value.
        - `deployment_date` integer — The timestamp for the most recent deployment.
        - `repository_state` object — A object containing information about the state of the repository at the time of the most recent deployment.
          - `author` string — The author's name and email address for the commit that the system most recently deployed.
          - `date` integer — The timestamp for the commit that the system most recently deployed.
          - `identifier` string — The identifier (SHA-1 value) for the commit that the system most recently deployed.
          - `message` string — The commit message for the commit that the system most recently deployed.
      - `last_update` object, nullable — An object containing information about the most recent (HEAD) commit for the current branch. **Note:** This object's information resembles the output of the `git log -1` command. **Important:** * If the repository does **not** include any commits, the function returns a `null` value instead of an object. * The system may require a large amount of time to clone larger repositories. Until this process finishes, HEAD information is unavailable.
        - `author` string — The most recent commit's author name and email address.
        - `date` integer — The timestamp for the most recent commit.
        - `identifier` string — The identifier (SHA-1 value) for the most recent commit.
        - `message` string — The commit message.
      - `name` string — The repository's display name.
      - `repository_root` string — The directory path that exists in the user's `home` directory containing the repository.
      - `source_repository` object — An object containing information about the source repository. **Note:** The function **only** returns this object if you cloned a source repository.
        - `remote_name` string — The source repository's name.
        - `url` string — The source repository's clone URL.
      - `tasks` object[] — An array of objects containing information about the [Task Queue](https://go.cpanel.net/whmdocsTaskQueueMonitor) system's process that will clone the repository. **Note:** The function **only** returns this value if the clone process is not finished.
        - `action` 'create' | 'deploy' — The task's action. * `create` — Create the repository. * `deploy` — Deploy the repository.
        - `args` object — An object containing arguments for the Task Queue system's process.
          - `log_file` string — The absolute path to the process log file in the user's `home` directory. **Note:** The function **only** returns this value if the process generated a log file.
          - `repository_root` string — The repository's absolute directory path in the user's `home` directory.
        - `id` string — The Task Queue system's task ID number.
        - `subsystem` 'VersionControl' — The Task Queue subsystem that will handle the task. * `VersionControl` **Note:** * `VersionControl` is the only possible value.
      - `type` 'git' — The repository type. * `git` — A [Git](https://git-scm.com/) repository. **Note:** * `git` is the only possible value.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
