website/docs/commands/prev.md
check out an ancestor commit
Update to an ancestor commit of the current commit. When working with a stack
of commits, you can use sl previous to move down your stack with ease.
Use the --newest flag to always pick the newest of multiple parents commits. You can set amend.alwaysnewest to true in your global Sapling config file to make this the default.
Use the --merge flag to bring along uncommitted changes to the destination commit.
Use the --bookmark flag to move to the first ancestor commit with a bookmark.
Examples:
sl prev
sl prev 2
sl prev --bottom
| shortname | fullname | default | description |
|---|---|---|---|
--newest | false | always pick the newest parent when a commit has multiple parents | |
--bottom | false | update to the lowest non-public ancestor of the current commit | |
--bookmark | false | update to the first ancestor with a bookmark | |
--no-activate-bookmark | false | do not activate the bookmark on the destination commit | |
-C | --clean | false | discard uncommitted changes (no backup) |
-B | --move-bookmark | false | move active bookmark |
-m | --merge | false | merge uncommitted changes |
-c | --check | false | require clean working directory |