Git Client
Git Client from the Source control package.
Loading GitClient…
Source code
Waiting for the preview before loading source files · 2 of 2
Properties
Public properties derived from the component’s TypeScript signature.
| Property | Type | Default |
|---|---|---|
snapshotsOptional | readonly GitCommit[] | — |
backupsOptional | readonly GitCommit[] | — |
changesRequired | readonly GitChange[] | — |
commitDiffOptional | readonly GitChange[] | [] |
currentCheckoutRequired | GitCheckoutState | — |
loadingOptional | boolean | false |
refreshingOptional | boolean | false |
hasPendingBackupOptional | boolean | — |
headerTitleOptional | string | "Source control" |
branchOptional | string | — |
defaultBranchOptional | string | "main" |
branchesOptional | readonly string[] | — |
commitMessageOptional | string | — |
defaultCommitMessageOptional | string | "" |
sidebarOpenOptional | boolean | — |
defaultSidebarOpenOptional | boolean | true |
defaultSidebarWidthOptional | number | 384 |
changeViewOptional | "list" | "tree" | — |
defaultChangeViewOptional | "list" | "tree" | "list" |
selectedChangePathOptional | string | null | — |
defaultSelectedChangePathOptional | string | null | null |
selectedDiffOptional | GitFileDiff | null | — |
diffLoadingOptional | boolean | false |
fetchingOptional | boolean | false |
pullingOptional | boolean | false |
pushingOptional | boolean | false |
committingOptional | boolean | false |
showMobileToolbarOptionalKeeps the full toolbar on desktop while embedded mobile review surfaces provide their own repository chrome. | boolean | true |
showMobileChangeViewToolbarOptionalHides the mobile change-view toolbar when an embedding surface renders the controlled toggle in its own header. | boolean | true |
diffModeOptional | "split" | "unified" | — |
onDiffModeChangeOptional | ((mode: DiffViewerMode) => void) | — |
onRefreshOptional | (() => void) | — |
onFetchOptional | (() => void) | — |
onPullOptional | (() => void) | — |
onPushOptional | (() => void) | — |
onBranchChangeOptional | ((branch: string) => void) | — |
onCommitMessageChangeOptional | ((message: string) => void) | — |
onCommitOptional | ((message: string) => void) | — |
onCommitAndPushOptional | ((message: string) => void) | — |
onAmendCommitOptional | ((message: string) => void) | — |
onSidebarOpenChangeOptional | ((open: boolean) => void) | — |
onChangeViewChangeOptional | ((view: GitChangeView) => void) | — |
onCreateSnapshotOptional | (() => void) | — |
onCreateBackupOptional | (() => void) | — |
onPushBackupOptional | (() => void) | — |
onCheckoutOptional | ((commit: GitCommit) => void) | — |
onRestoreLatestOptional | (() => void) | — |
onRestoreOptional | ((commit: GitCommit) => void) | — |
onSelectChangeOptional | ((change: GitChange) => void) | — |
onOpenFileOptionalOpens the current file contents without selecting its Git diff. | ((change: GitChange) => void) | — |
onStageChangeOptional | ((change: GitChange) => void) | — |
onUnstageChangeOptional | ((change: GitChange) => void) | — |
onDiscardChangeOptional | ((change: GitChange) => void) | — |
customizeOptional | UiCustomization | — |