stash

vb stash SUBCOMMAND

Description

The stash command is used save the current changes in

Subcommands

vb stash save (snapshot)

vb stash save|snapshot [FILES ...]

Description

Save the current changes in the working tree as a new stash. Then revert the changes back to the last check-in. If FILES are listed, then only stash and revert the named files. The save verb can be omitted if and only if there are no other arguments. The snapshot verb works the same as save but omits the revert, keeping the check-out unchanged.

Options

--editor NAME

Use the NAME editor to enter comment

-m, --comment COMMENT

Comment text for the new stash

vb stash list (ls)

vb stash list|ls [-v|--verbose] [-W|--width NUM]

Description

List all changes sets currently stashed. Show information about individual files in each changeset if -v or –verbose is used.

vb stash show (gshow, cat, gcat)

vb stash show|gshow|cat|gcat [STASHID] [DIFF-OPTIONS]

Description

Show the contents of a stash as a diff against its baseline. With gshow and gcat, gdiff-command is used instead of internal diff logic.

vb stash pop

vb stash pop

Description

The pop command deletes that changeset from the stash after applying it.

vb stash apply

vb stash apply [STASHID]

Description

Apply STASHID or the most recently created stash to the current working check-out.

vb stash goto

vb stash goto [STASHID]

Description

Update to the baseline check-out for STASHID then apply the changes of STASHID. Keep STASHID so that it can be reused This command is undoable.

vb stash drop (rm)

vb stash drop|rm [STASHID] [-a|--all]

Description

Forget everything about STASHID. Forget the whole stash if the -a|–all flag is used. Individual drops are undoable but -a|–all is not.

vb stash diff (gdiff)

vb stash diff|gdiff [STASHID] [DIFF-OPTIONS]

Description

Show diffs of the current working directory and what that directory would be if STASHID were applied. With gdiff, gdiff-command is used instead of internal diff logic.

Examples

  • Init and open a repository

$ vb init stash_repo.vbyte
project-id: 3741577b686ef12a9b3ae4804279bbed40663896
server-id:  69b5023ffe6df552f1e27f3b66c0fec0f3d20c5d
admin-user: ubuntu (initial remote-access password is "hpUvjrtNc2")
$ vb open -f stash_repo.vbyte
project-name: <unnamed>
repository:   /tmp/sphinx_tests/c0887642/stash_repo/stash_repo.vbyte
local-root:   /tmp/sphinx_tests/c0887642/stash_repo/
config-db:    /tmp/sphinx_tests/c0887642/.visionbyte
project-code: 3741577b686ef12a9b3ae4804279bbed40663896
checkout:     ac213bfc4f1a1ab222539d5cbd129c8644fc493c 2026-03-20 03:03:53 UTC
tags:         trunk
comment:      initial empty check-in (user: ubuntu)
check-ins:    1
  • Create and commit a tracked file

$ vb sys echo "line 1" > note.md
$ vb add note.md
ADDED  note.md
$ vb ci -m "add note"
Committed version: 93666202f614623355e72d2562ced507eb946e2f519d8624e0fdbf88f5ed4257
  • Modify the tracked file, then save the change in a stash

$ vb sys echo "draft line" >> note.md
$ vb stash save -m "WIP on note"
REVERT   note.md
stash 1 saved
  • List the saved stash entry

$ vb stash list -v
    1: [93666202f61462] on 2026-03-20 03:03:53
       WIP on note
          EDIT note.md
  • Restore the most recent stash back into the working tree

$ vb stash pop
UPDATE note.md
Popped stash:
    1: [93666202f61462] from 2026-03-20 03:03:53
       WIP on note
 "vb undo" is available to undo changes to the working checkout.