Understanding Jujutsu bookmarks
46 points by matklad
46 points by matklad
Side note: I am pretty sure they are heavily inspired by Mercurial Bookmarks (which I wrote).
I recently learned about jj git push --named
, which allows you to create a new bookmark and push it in one step!
You need to specify the name of the new bookmark, as well as the target revision. I often use a command like
jj git push --named my-new-feature=@-
to create a bookmark pointing to the parent revision, and push it. It makes me very happy! :)
Oh cool, I gotta try this next week. I’ve been using something I got from a friend:
[aliases]
p=["git", "push", "-r", "latest_bookmark", "--allow-new"]
[revset-aliases]
'latest_bookmark'='latest_bookmark(@)'
'latest_bookmark(x)'='latest(bookmarks() & mine() & ..x & mutable(), 1)'
In my experience with jj, I have had no use for bookmarks other than for interacting with Git
Tagging release commits seems like a reasonable one.
Yeah that is a good one. Luckily it’s very easy to use git tag for this, or via the web on GitHub. Eventually jj will have something native here, it’s just that other things are worth spending time on right now.
Since bookmarks by default don’t move, I think they fit very well as a native solution!
And it’s already got jj tag list
which lets us at least inspect the current git tags. I wouldn’t mind a feature that just specifies that a given bookmark should be kept in sync with a given git tag.
Anything else you think would be needed?