HG(BOOKMARKS)
π hg bookmarks π
okay bestie, listen β this is the hg bookmarks page from the Mercurial manual and it's genuinely one of the most useful ones, no cap. π
β¨ NAME β¨
hg bookmarks β create a new bookmark or list existing bookmarks π¦
πΈ SYNOPSIS πΈ
hg bookmarks [OPTIONS]... [NAME]...
π DESCRIPTION π
okay so, bookmarks are literally just labels on changesets to help you track lines of development. that's the whole vibe. π·οΈ
bookmarks are unversioned β meaning they're not part of the repo history at all β and they can be moved, renamed and deleted whenever you want. and here's the part that lowkey blows people's minds: deleting or moving a bookmark has no effect on the associated changesets. the changesets are fine. they're safe. the bookmark was just a lil sticky note on top. π
β the active bookmark situation β
creating a bookmark or updating to one causes it to be marked as 'active'. the active bookmark shows up with a '*' next to it β that's your main character indicator, periodt. π
when you make a commit, the active bookmark advances to the new commit. a plain hg update will also advance an active bookmark, if possible. and if you update away from a bookmark? it gets deactivated. sorry girl, you left. π
π pushing, pulling & divergence π
bookmarks can be pushed and pulled between repositories (peep hg help push and hg help pull). β¨
but if a shared bookmark has diverged, a new 'divergent bookmark' of the form 'name@path' gets created. the way to fix that? using hg merge will resolve the divergence. slay. π«Ά
π the . shortcut π
specifying a bookmark as '.' to the -m/-d/-l options is equivalent to specifying the active bookmark's name. so you don't even gotta type it out. iykyk. π
π the special '@' bookmark π
a bookmark named '@' has the special property that hg clone will check it out by default if it exists. it's giving VIP. it's giving default-branch energy. π
π§ Template π§
the following keywords are supported in addition to the common template keywords and functions such as {bookmark}. see also hg help templates. πΈ
activeβ Boolean. True if the bookmark is active.
π Examples π
- create an active bookmark for a new line of development:
hg book new-feature
- create an inactive bookmark as a place marker:
hg book -i reviewed
- create an inactive bookmark on another changeset:
hg book -r .^ tested
- rename bookmark
turkeytodinner:
hg book -m turkey dinner
- move the
'@'bookmark from another branch:
hg book -f @
- print only the active bookmark name:
hg book -ql .
π OPTIONS π
-f,--forceβ force. that's it. that's the description. it forces. πͺ-r,--rev <REV>β revision for bookmark action-d,--deleteβ delete a given bookmark-m,--rename <OLD>β rename a given bookmark-i,--inactiveβ mark a bookmark inactive-l,--listβ list existing bookmarks-T,--template <TEMPLATE>β display with template
π¦ ALIASES π¦
bookmark
so yeah, you can just type hg bookmark and it hits the exact same. shorter, cuter, same energy. β¨
okay bestie that's the whole page, no notes, you ate it up fr fr. π this lil manual page lives under the HG(BOOKMARKS) title and honestly the version/date info is right there in that footer vibe β that's all the source and date deets this one's got, so consider it acknowledged and blessed. go forth and bookmark everything. πβ¨π¦πΈπ
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms