Skip to main content
Documentation
CLI Reference · Current

Local stash

Temporarily record supported staged and tracked working-tree changes in the current repository.

Syntax

dits stash [ACTION] [OPTIONS]

Actions:
  push | save   Save supported local changes (default action)
  pop           Apply a stash and remove its list entry
  apply         Apply a stash without removing its list entry
  list          List stash entries
  show          Show paths recorded by a stash
  drop          Remove one stash entry
  clear         Remove every stash entry

Options:
-m, --message <MESSAGE>   Message for push/save
-i, --index <N>           Numeric entry index for pop/apply/show/drop

Examples

# Save; push is optional because it is the default
dits stash push --message "WIP grade"
dits stash

dits stash list
dits stash show --index 0

dits stash apply --index 0
dits stash pop --index 0

dits stash drop --index 1
dits stash clear

Index 0 is the newest entry. The parser accepts a numeric --index; it does not accept Git-style stash@{N} operands.

Current limits

  • There is no pathspec selection, --keep-index, untracked or ignored-file switch, branch creation, expiration policy, or patch mode.
  • show lists recorded paths and stash metadata; it does not produce a full diff.
  • Apply and pop restore recorded paths directly. They do not perform a three-way content merge or offer a conflict-resolution UI.
  • Drop and clear remove entries from the stash list. Dits does not promise a supported recovery command for removed entries.

See file commands and local history for related workflows.