Git CLI Command Reference

Every dcloud git command. The shape is dcloud <service> <resource> <verb>; every command also takes the global flags (--json, --profile, --dry-run, …).

dcloud git repositories

Repositories served by the platform itself

  • listList repositories
  • createCreate a repository
  • importImport a repository from GitHub, GitLab or a git URL, optionally as a mirror
  • forkFork a repository of the organization
  • sync-forkFast-forward a fork's branch to its parent's
  • get-importHow far an import has come: phase, branches, tags and pull requests so far, started and finished, or why it failed
  • retry-importStart a failed import again from the same source
  • sync-mirrorFetch a mirror from its source now
  • get-mirror-statusA mirror's last day (syncs, failures, lag), recent syncs and failures
  • update-mirrorChange a mirror's interval, the minute poll, or shadow CI
  • run-shadow-ciRun a shadowed mirror's workflows on a branch's current head now (default: the default branch)
  • list-shadow-comparisonsA shadowed mirror's newest commits: the source's CI and ours side by side, in counts
  • get-shadow-comparisonOne commit: every workflow and job, the source's result and ours, and the verdict
  • stop-mirrorStop mirroring: syncing ends and pushes become possible; history, branches, tags and pull requests stay
  • set-push-mirrorCopy every push to a remote outside Deutsche Cloud (branches and tags)
  • sync-push-mirrorPush to the push mirror now
  • remove-push-mirrorStop copying pushes to the remote; it keeps what it has
  • getDescribe one repository
  • updateChange description, visibility, default branch or archive state
  • deleteDelete a repository

dcloud git branches

Refs, and the console-side equivalent of pushing to them

dcloud git tags

Tag refs

dcloud git commits

History, individual commits, and console-made commits

  • listList commits on a ref
  • getShow one commit with its patch
  • createCommit file edits to a branch
  • compareDiff two refs

dcloud git files

Reading the working tree at a ref

  • treeList entries under a path
  • blobRead one file as raw text
  • insightsCommits per week, contributors and pull request activity
  • blameWhich commit last changed each line of a file
  • highlightedOne file as lines with syntax highlighting
  • rawServe one file verbatim
  • archiveDownload the tree at a ref as an archive

dcloud git pulls

Pull requests, backed by real merges

  • listList pull requests
  • createOpen a pull request
  • getShow a pull request with mergeability, checks and approvals
  • updateEdit a pull request's title or description
  • mergeMerge, squash or rebase a pull request
  • enable-auto-mergeMerge automatically once approvals and required checks pass
  • disable-auto-mergeTurn auto-merge off
  • closeClose a pull request without merging
  • reopenReopen a closed pull request
  • readyMark a draft ready for review (fires ready_for_review: webhooks and the workflows that list it)
  • convert-to-draftTurn an open pull request back into a draft (fires converted_to_draft: webhooks and the workflows that list it)
  • list-reviewsList reviews on a pull request
  • reviewApprove, request changes, or comment
  • list-commentsList comments, including inline ones
  • list-viewed-filesThe files you marked viewed that have not changed since
  • mark-file-viewedMark one file viewed, or clear the mark, for yourself
  • commentComment on a pull request or on a line of it
  • resolve-commentMark a comment thread resolved or reopen it
  • apply-suggestionCommit a review comment's suggested change to the pull request's branch
  • list-reviewersList requested reviewers
  • add-reviewerRequest a review from someone
  • remove-reviewerWithdraw a review request

dcloud git merge-queue

A protected branch's merge queue (GitHub's merge queue)

  • getShow a branch queue: settings, entries in order, recent results and events
  • addAdd a pull request to its target branch merge queue ("merge when ready")
  • removeRemove a pull request from the merge queue

dcloud git releases

Named, published tags; publishing one starts `on: release` workflows

  • listList a repository’s releases, newest first
  • getOne release
  • createCreate a release (and its tag, when new)
  • updateEdit a release, or publish a draft (draft: false)
  • deleteDelete a release; its tag stays

dcloud git release-assets

Files attached to a release — binaries, archives, checksums

dcloud git security

Security & quality: the security policy, secret scanning, dependency and code scanning alerts

  • getThe repository’s security overview: settings, policy, open alert counts
  • update-settingsTurn secret push protection or dependency alerts on or off, set the file size limit
  • overviewOpen alerts and protection settings for every repository you may see
  • list-secret-alertsSecrets push protection found: blocked, bypassed and resolved, plus scan gaps
  • resolve-secret-alertSay what was done about a bypassed secret (revoked, false positive, …)
  • list-dependency-alertsVulnerable dependencies in the default branch’s lockfiles
  • set-dependency-alertDismiss a dependency alert with a reason, or reopen it
  • get-dependency-alertOne dependency alert: the advisory in full, CVSS, links, why the package is installed, and every place it is
  • fix-dependenciesFix the security issues of this repository: open a pull request that bumps the vulnerable dependencies of its package-lock.json and pnpm-lock.yaml
  • get-dependency-fixThe last fix pull request asked for, and the open ones
  • scan-dependenciesScan the default branch’s lockfiles now
  • list-code-scanning-alertsCode scanning alerts on the default branch
  • set-code-scanning-alertDismiss a code scanning alert with a reason, or reopen it
  • upload-sarifUpload a SARIF 2.1.0 file of code scanning results for a commit
  • code-scanning-at-commitCode scanning results reported for one commit, per tool

dcloud git issues

Issues: bugs, tasks and CI alerts, with labels, assignees and comments

  • listList a repository’s issues, newest first
  • createOpen an issue
  • getOne issue with its comments
  • updateEdit, close or reopen an issue; replace its labels or assignees
  • commentComment on an issue

dcloud git labels

A repository’s labels, shared by its issues and pull requests

dcloud git tag-protection

Tag patterns only holders of git:PushProtectedTag may create, move or delete

  • listList protected tag patterns
  • createProtect a tag pattern
  • deleteRemove a tag protection rule

dcloud git commit-statuses

Pass/fail an external tool reports on a commit; a required check can name one

  • listStatuses reported on a commit
  • createReport a status on a commit (one per context; a later one replaces it)

dcloud git branch-protection

Rules that constrain what may land on a branch

  • listList branch protection rules
  • createAdd a branch protection rule
  • updateChange a branch protection rule
  • deleteRemove a branch protection rule

dcloud git deploy-keys

Per-repository SSH keys for machines

dcloud git webhooks

Outbound notifications on repository events

dcloud git webhook-deliveries

A webhook's recent deliveries (30 days), and sending one again

dcloud git access-tokens

HTTP credentials for cloning and pushing

  • listList your git access tokens
  • createCreate a git access token and return it once
  • deleteRevoke a git access token

dcloud git ssh-keys

Your SSH public keys for git over SSH

  • listList your registered SSH keys
  • createRegister an SSH public key
  • deleteRemove a registered SSH key

dcloud git attachments

Images and video attached to pull request comments

  • getFetch an attachment

dcloud git github

Connect GitHub: installations of the platform's GitHub App, repositories mirrored and pushed back through them

  • list-installationsList connected GitHub accounts and the repositories each covers
  • disconnect-installationDisconnect a GitHub account; its mirrors stop syncing
  • mirrorMirror a GitHub repository the installation covers (no token kept)
  • set-shadow-ciTurn shadow CI on or off for a mirror (3,000 runner minutes a month per repository, 10,000 per organization, 2 runs at once)
  • set-push-backPush a repository back to GitHub after every push, through the App

Generated from the API description, the same one the API checks requests against and the CLI is built from.