Skip to main content
Documentation
CLI Reference

Branch and History Editing

Work with the repository's local commit graph using only the options accepted by the current alpha.

CommandCurrent behaviorUsage
branchList, create, or delete a local branchdits branch [NAME] [-d]
switchSwitch to an existing local branchdits switch <BRANCH>
checkoutCheck out a local commit or branchdits checkout <TARGET>
mergeMerge one local branch into the current branchdits merge <BRANCH> [-m <MESSAGE>]
rebaseReapply local commits on another basedits rebase [UPSTREAM] [OPTIONS]
cherry-pickApply one or more local commitsdits cherry-pick <COMMIT>... [--no-commit]
tagList, create, or delete local tagsdits tag [NAME] [OPTIONS]

dits branch

With no name, branch lists local branches. With a name it creates a branch at the current commit; --delete removes the named local branch. Rename, copy, force-delete, merged filtering, and remote-listing flags are not accepted by this command.

dits branch
dits branch feature/color-pass
dits branch --delete feature/color-pass

Switch and checkout

switch accepts exactly one existing branch name. checkout accepts a commit or branch target and reconstructs the selected state. The optional checkout mode is full by default; proxy mode belongs to the experimental media path.

dits switch feature/color-pass
dits checkout main
dits checkout <commit-id>

# Experimental proxy checkout path
dits checkout main --mode proxy

dits merge

Merges one named local branch into the current branch. The only command option is an optional merge-commit message.

dits merge feature/color-pass
dits merge feature/color-pass --message "Merge color pass"

dits rebase

Rebase accepts an optional upstream plus --onto, --continue, --abort, or --skip. Interactive rebase is not implemented.

dits rebase main
dits rebase main --onto <commit-id>
dits rebase --continue
dits rebase --skip
dits rebase --abort

dits cherry-pick

dits cherry-pick <commit-id>
dits cherry-pick <first-commit> <second-commit>
dits cherry-pick --no-commit <commit-id>

dits tag

With no name, tag lists local tags. Create a tag by name, optionally selecting a commit with --commit. Delete with--delete. Listing can be sorted by name, created, or version; because current tags do not store creation timestamps, created presently falls back to name order. Annotated tags and tag pushing are not current features.

dits tag
dits tag review-ready
dits tag review-ready --commit <commit-id>
dits tag --sort created
dits tag review-ready --delete

Use dits <command> --help for parser-authoritative syntax. See history inspection and the disabled remote status for the adjacent workflows.