logoalt Hacker News

arccytoday at 12:14 PM2 repliesview on HN

note that bookmarks don't float, unlike git branches, so if your pattern is to produce a lot of commits, you'll want something to keep your jj bookmarks pointing to the top of your pile of commits.

this is less of a problem if you're more into the 1 change == 1 commit workflow.


Replies

pimeystoday at 12:18 PM

There's a very common alias `jj tug` for this case:

  tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"]
It moves the nearest bookmark to the commit before the current one (which should be your working commit).
show 3 replies
limatoday at 12:16 PM

There's an experimental-advance-branches feature which helps with that!