logoalt Hacker News

pimeystoday at 12:18 PM3 repliesview on HN

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).

Replies

mhitzatoday at 3:23 PM

This looks like any other git arcane incantation. If this is a common pattern and jj aims to make things easier, should probably be part of the core commands, no?

stavrostoday at 12:47 PM

Thanks, I replaced my Frankenstein's monster of a parsing pipeline with this, very useful!