Version 4.0.24.12
Checkout and/or reset --hard an existing Git Branch
Only allowed in development mode
- Call
update_session
to select the 'dev' workspace.
Checkout an existing branch if name field is different from the name of the currently checked out branch.
Optionally specify a branch name, tag name or commit SHA to which the branch should be reset. DANGER hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.
Request
PUT
/projects/{project_id}/git_branch
Datatype
Description
Request
path
Expand HTTP Path definition...
project_id
Project Id
body
Expand HTTP Body definition...
body
Git Branch
Expand GitBranch definition...
can
lock
Operations the current user is able to perform on this object
name
The short name on the local. Updating `name` results in `git checkout `
remote
lock
The name of the remote
remote_name
lock
The short name on the remote
error
lock
Name of error
message
lock
Message describing an error if present
owner_name
lock
Name of the owner of a personal branch
readonly
lock
Whether or not this branch is readonly
personal
lock
Whether or not this branch is a personal branch - readonly for all developers except the owner
is_local
lock
Whether or not a local ref exists for the branch
is_remote
lock
Whether or not a remote ref exists for the branch
is_production
lock
Whether or not this is the production branch
ahead_count
lock
Number of commits the local branch is ahead of the remote
behind_count
lock
Number of commits the local branch is behind the remote
commit_at
lock
UNIX timestamp at which this branch was last committed.
ref
The resolved ref of this branch. Updating `ref` results in `git reset --hard ``.
remote_ref
lock
The resolved ref of this branch remote.
Response
200: Git Branch
Datatype
Description
(object)
can
lock
Operations the current user is able to perform on this object
name
The short name on the local. Updating `name` results in `git checkout `
remote
lock
The name of the remote
remote_name
lock
The short name on the remote
error
lock
Name of error
message
lock
Message describing an error if present
owner_name
lock
Name of the owner of a personal branch
readonly
lock
Whether or not this branch is readonly
personal
lock
Whether or not this branch is a personal branch - readonly for all developers except the owner
is_local
lock
Whether or not a local ref exists for the branch
is_remote
lock
Whether or not a remote ref exists for the branch
is_production
lock
Whether or not this is the production branch
ahead_count
lock
Number of commits the local branch is ahead of the remote
behind_count
lock
Number of commits the local branch is behind the remote
commit_at
lock
UNIX timestamp at which this branch was last committed.
ref
The resolved ref of this branch. Updating `ref` results in `git reset --hard ``.
remote_ref
lock
The resolved ref of this branch remote.
400: Bad Request
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
404: Not Found
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
422: Validation Error
Datatype
Description
(object)
message
lock
Error details
errors
Expand ValidationErrorDetail definition...
field
lock
Field with error
code
lock
Error code
message
lock
Error info message
documentation_url
lock
Documentation link
documentation_url
lock
Documentation link
429: Too Many Requests
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
Examples
TypeScript
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/typescript/validateBranch.ts |