Skip to main content



save pending changes and revert working copy to a clean state

Shelving takes files that sl status reports as not clean, saves the modifications to a bundle (a shelved change), and reverts the files to a clean state in the working copy.

To restore the changes to the working copy, use sl unshelve regardless of your current commit.

When no files are specified, sl shelve saves all not-clean files. If specific files or directories are named, only changes to those files are shelved.

Each shelved change has a name that makes it easier to find later. The name of a shelved change by default is based on the active bookmark. To specify a different name, use --name.

To see a list of existing shelved changes, use the --list option. For each shelved change, this will print its name, age, and description. Use --patch or --stat for more details.

To delete specific shelved changes, use --delete. To delete all shelved changes, use --cleanup.

Returns 0 on success.


-A--addremovemark new/missing files as added/removed before shelving
-u--unknownstore unknown files in the shelve
--cleanupdelete all shelved changes
--dateshelve with the specified commit date
-d--deletedelete the named shelved change(s)
-e--editfalseinvoke editor on commit messages
-l--listlist current shelves
-m--messageuse text as shelve message
-n--nameuse the given name for the shelved commit
-p--patchshow patch
-i--interactiveinteractive mode - only works while creating a shelve
--statoutput diffstat-style summary of changes
-I--includeinclude files matching the given patterns
-X--excludeexclude files matching the given patterns