website/docs/overview/bookmarks.md
import {Command} from '@site/elements'
Sapling has bookmarks instead of branches. Like a Git branch, a bookmark is just a name that points to a particular commit and can be used to refer to that commit during checkout, rebase, etc. Sapling has two different types of bookmarks: local and remote.
Sapling does not require local bookmarks for development. In fact, for day-to-day development, bookmarks are discouraged since people find it easier not to use them.
Local bookmarks:
sl bookmark command.Remote bookmarks:
remote/ (example: remote/main)sl pull or moved by sl push.All of your local bookmarks and your most important remote
bookmarks are shown in smartlog output. In this example,
remote/main is a remote bookmark and my_feature is created as
a local bookmark.
$ sl
o b84224608 13 minutes ago remote/main
╷
╷ @ 15de72785 35 seconds ago mary
╭─╯ Implement glorious features
│
o a555d064c Wednesday at 09:06
│
~
$ sl bookmark my_feature
$ sl
o b84224608 13 minutes ago remote/main
╷
╷ @ 15de72785 35 seconds ago mary my_feature*
╭─╯ Implement glorious features
│
o a555d064c Wednesday at 09:06
│
~
The asterisk (*) on the my_feature bookmark indicates the
bookmark is active. If you make a commit, the active bookmark
will move forward to point at the new commit. If my_feature was
not active, making a new commit would not change my_feature,
which would remain pointing at 15de72785.
A bookmark is made active when it is first created or when it is
explicitly checked out with sl goto my_feature. It is made
inactive when you explicitly go to another commit, like with sl goto OTHER_COMMIT.
smartlog regardless
of whether they have a bookmark or not.