Skip to main content

Git CLI

Git operations on the project

These commands connect to a running CodeBolt server. All subcommands inherit the global codebolt command options --port <number>, --host <string>, and --json.

Subcommands

SubcommandDescriptionArgsOptions
statusShow working directory status00
branchesList branches00
diffShow current diff01
remoteShow remote URL00
logShow commit history01
commitCreate a commit01
checkoutCheckout a branch11
create-branchCreate a new branch11
pushPush to remote00
pullPull from remote00

status

Show working directory status

codebolt command git status

Arguments

This command takes no positional arguments.

Options

This command takes no options.

branches

List branches

codebolt command git branches

Arguments

This command takes no positional arguments.

Options

This command takes no options.

diff

Show current diff

codebolt command git diff [options]

Arguments

This command takes no positional arguments.

Options

FlagsRequiredDescription
--file <path>NoDiff a specific file

remote

Show remote URL

codebolt command git remote

Arguments

This command takes no positional arguments.

Options

This command takes no options.

log

Show commit history

codebolt command git log [options]

Arguments

This command takes no positional arguments.

Options

FlagsRequiredDescription
--limit <number>NoNumber of commits (default: 20)

commit

Create a commit

codebolt command git commit [options]

Arguments

This command takes no positional arguments.

Options

FlagsRequiredDescription
--message <msg>YesCommit message

checkout

Checkout a branch

codebolt command git checkout [branch] [options]

Arguments

ArgumentDescription
[branch]Branch name

Options

FlagsRequiredDescription
--branch <name>NoBranch name

create-branch

Create a new branch

codebolt command git create-branch [name] [options]

Arguments

ArgumentDescription
[name]Branch name

Options

FlagsRequiredDescription
--name <name>NoBranch name

push

Push to remote

codebolt command git push

Arguments

This command takes no positional arguments.

Options

This command takes no options.

pull

Pull from remote

codebolt command git pull

Arguments

This command takes no positional arguments.

Options

This command takes no options.