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:
branch
value.type
, repository_root
, or url
values for existing repositories.repository_root
parameter in order to identify the repository to
update.uapi --output=jsonpretty \ --user=username \ VersionControl \ update \ repository_root='/home/user/public_html/example'
{- "apiversion": 3,
- "func": "update",
- "module": "VersionControl",
- "result": {
- "data": {
- "available_branches": [
- "master"
], - "branch": "master",
- "clone_urls": {
- "read_write": [
- "ssh://user@example.com/home/user/example"
]
}, - "deployable": 1,
- "last_deployment": {
- "deployment_date": 1569844800,
- "repository_state": {
- "author": "User Name <user.name@example.com>",
- "date": 1569844800,
- "identifier": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb121",
- "message": "I'm committing some particularly cromulent code."
}
}, - "last_update": {
- "author": "Jane Doe <jane.doe@example.com>",
- "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"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}