3 ms·
It’s one of the core features that rebases, including branch names (bookmarks in jj) work ‘correctly’. You can rebase whole dags, including merges, with multipl
by baq 11mo ago
It’s one of the core features that rebases, including branch names (bookmarks in jj) work ‘correctly’. You can rebase whole dags, including merges, with multiple named heads with just one jj rebase -b.
- arccy 11mo agonote 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.
- lima 11mo agoThere's an experimental-advance-branches feature which helps with that!
- pimeys 11mo agoThere'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).
- stavros 11mo agoThanks, I replaced my Frankenstein's monster of a parsing pipeline with this, very useful!
- deleted 11mo ago[deleted]
- mhitza 11mo agoThis 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?
- steveklabnik 11mo agoIt's something that makes a specific workflow easier, a lot of folks that use jj don't necessarily use that workflow. That doesn't mean it couldn't be a core command someday, but given that the alias works well for people, there's not a ton of reason to make a whole new command. You configure the alias and you're off to the races.
- gcr 11mo agoTo expand: In jj, bookmarks point to "changes," not commits. Rebases, history manipulations, etc. preserve change ID, so this "just works."