Skip to main content

next

next

check out a descendant commit

Update to a descendant commit of the current commit. When working with a stack of commits, you can use sl next to move up your stack with ease.

  • Use the --newest flag to always pick the newest of multiple child 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 next commit with a bookmark.

  • Use the --rebase flag to rebase any child commits that were left behind after amend, split, fold, or histedit.

Examples:

  • Move 1 level up the stack:
sl next
  • Move 2 levels up the stack:
sl next 2
  • Move to the top of the stack:
sl next --top

arguments

shortnamefullnamedefaultdescription
--newestfalsealways pick the newest child when a commit has multiple children
--rebasefalserebase each commit if necessary
--topfalseupdate to the head of the current stack
--bookmarkfalseupdate to the first commit with a bookmark
--no-activate-bookmarkfalsedo not activate the bookmark on the destination commit
--towardsmove linearly towards the specified head
-C--cleanfalsediscard uncommitted changes (no backup)
-B--move-bookmarkfalsemove active bookmark
-m--mergefalsemerge uncommitted changes
-c--checkfalserequire clean working directory