# Update Git repository settings 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. * This function pulls changes from the remote repository if you specify a value. * You modify the , , or values for existing repositories. * You include the parameter in order to identify the repository to update. * All other input parameters are . Use them to assign the values to the account. If you do not include a parameter or specify its existing value, no change will occur. Endpoint: GET /VersionControl/update Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `repository_root` (string, required) The absolute directory path that contains the repository to update. Example: "/home/user/public_html/example" - `branch` (string) The new branch to use. If you do not specify a value, the function does update this parameter. This function pulls changes from the remote repository if you specify this value. Example: "master" - `name` (string) The repository's new display name. If you do not specify a value, the function does update this parameter. Example: "example" - `source_repository` (object) A JSON-encoded object containing information about the source repository. If you do not specify a value, the function does update this parameter. * You modify the source repository's URL. * You JSON-encode the contents of this object. Example: {"remote_name":"origin"} ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "update" - `module` (string) The name of the module called. Example: "VersionControl" - `result` (object) - `result.data` (object) Example: {"available_branches":["master"],"branch":"master","clone_urls":{"read_only":["https://user@example.com/home/user/example"],"read_write":["ssh://user@example.com/home/user/example"]},"deployable":1,"last_deployment":{"deployment_date":1569844800,"repository_state":{"author":"User Name ","date":1569844800,"identifier":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb121","message":"I'm committing some particularly cromulent code."}},"last_update":{"author":"Jane Doe ","date":1569844800,"identifier":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","message":"I'm committing some particularly cromulent code."},"name":"example","repository_root":"/home/user/example","tasks":[{"action":"create","args":{"repository_root":"/home/user/example"},"id":"00000000/5a9ec8dd4c345d","subsystem":"VersionControl"}],"type":"git"} - `result.data.available_branches` (array) A list of local and remote branches available for the cloned or existing repository. * An empty array, if no branches exist. * — The repository is a bare repository. Example: ["master"] - `result.data.branch` (string,null) The repository's current branch. * — The system has not finished the clone process for the repository, no local branches exist, or the repository is a bare repository. Example: "master" - `result.data.clone_urls` (object) An object containing the URLs to use to clone the repository. The function returns an empty object if the account does include the setting. If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number. Example: {"read_only":["https://user@example.com/home/user/example"],"read_write":["ssh://user@example.com/home/user/example"]} - `result.data.clone_urls.read_only` (array) A list of clone URLs with read-only permissions. This function returns an empty list if the account does include the setting. If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number. Example: ["https://user@example.com/home/user/example"] - `result.data.clone_urls.read_write` (array) A list of clone URLs with read-write permissions. This function returns an empty list if the account does include the setting. If the server uses a nonstandard SSH port, the system returns a clone URL that includes the port number. Example: ["ssh://user@example.com/home/user/example"] - `result.data.deployable` (integer) Whether the system could deploy the repository. * — Can deploy. * — Cannot deploy. Enum: 1, 0 - `result.data.last_deployment` (object,null) An object containing information about the commit that the system most recently deployed. If no deployment information exists, the function returns a value. Example: {"deployment_date":1569844800,"repository_state":{"author":"User Name ","date":1569844800,"identifier":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb121","message":"I'm committing some particularly cromulent code."}} - `result.data.last_deployment.deployment_date` (integer) The timestamp for the most recent deployment. Example: 1569844800 - `result.data.last_deployment.repository_state` (object) A object containing information about the state of the repository at the time of the most recent deployment. Example: {"author":"User Name ","date":1569844800,"identifier":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb121","message":"I'm committing some particularly cromulent code."} - `result.data.last_deployment.repository_state.author` (string) The author's name and email address for the commit that the system most recently deployed. Example: "User Name " - `result.data.last_deployment.repository_state.date` (integer) The timestamp for the commit that the system most recently deployed. Example: 1569844800 - `result.data.last_deployment.repository_state.identifier` (string) The identifier (SHA-1 value) for the commit that the system most recently deployed. Example: "2fd4e1c67a2d28fced849ee1bb76e7391b93eb121" - `result.data.last_deployment.repository_state.message` (string) The commit message for the commit that the system most recently deployed. Example: "I'm committing some particularly cromulent code." - `result.data.last_update` (object,null) An object containing information about the most recent (HEAD) commit for the current branch. This object's information resembles the output of the command. * If the repository does include any commits, the function returns a 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. Example: {"author":"Jane Doe ","date":1569844800,"identifier":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","message":"I'm committing some particularly cromulent code."} - `result.data.last_update.author` (string) The most recent commit's author name and email address. Example: "Jane Doe " - `result.data.last_update.date` (integer) The timestamp for the most recent commit. Example: 1569844800 - `result.data.last_update.identifier` (string) The identifier (SHA-1 value) for the most recent commit. Example: "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12" - `result.data.last_update.message` (string) The commit message. Example: "I'm committing some particularly cromulent code." - `result.data.name` (string) The repository's display name. Example: "example" - `result.data.repository_root` (string) The directory path that exists in the user's directory containing the repository. Example: "/home/user/example" - `result.data.source_repository` (object) An object containing information about the source repository. The function returns this object if you cloned a source repository. - `result.data.source_repository.remote_name` (string) The source repository's name. - `result.data.source_repository.url` (string) The source repository's clone URL. - `result.data.tasks` (array) An array of objects containing information about the [Task Queue](https://go.cpanel.net/whmdocsTaskQueueMonitor) system's process that will clone the repository. The function returns this value if the clone process is not finished. Example: [{"action":"create","args":{"repository_root":"/home/user/example"},"id":"00000000/5a9ec8dd4c345d","subsystem":"VersionControl"}] - `result.data.tasks.action` (string) The task's action. * — Create the repository. * — Deploy the repository. Enum: "create", "deploy" - `result.data.tasks.args` (object) An object containing arguments for the Task Queue system's process. - `result.data.tasks.args.log_file` (string) The absolute path to the process log file in the user's directory. The function returns this value if the process generated a log file. - `result.data.tasks.args.repository_root` (string) The repository's absolute directory path in the user's directory. - `result.data.tasks.id` (string) The Task Queue system's task ID number. - `result.data.tasks.subsystem` (string) The Task Queue subsystem that will handle the task. * * is the only possible value. Enum: "VersionControl" - `result.data.type` (string) The repository type. * — A [Git](https://git-scm.com/) repository. * is the only possible value. Enum: "git" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.