5 ms·
Workflow-wise I was struggling a bit to figure out how to work with the bookmarks in jj not moving along. I now have a bit of a new strategy: - When starting
by rtpg 2y ago
Workflow-wise I was struggling a bit to figure out how to work with the bookmarks in jj not moving along.
I now have a bit of a new strategy:
- When starting up a branch, right up the "final commit message", along with a bunch of notes on what I think I need and other TODOs
- While working, when I want to checkpoint some work, I use jj split to chop up some chunk of work, describe it, and then edit up my TODOs
this way the tip of my branch is always this WIP commit describing my end goal, I can find it, and I can add a bookmark to it.
Instead of git "I add changes over time and make my commit graph move forward", it's "I have a final commit node and add commits _behind it_". Been working well enough.
- notmywalrus 2y agoYou may be interested in the semi-standard `jj tug` alias [1], that moves "the most recent" bookmark up to `@-` [1]: https://github.com/jj-vcs/jj/discussions/5568 https://github.com/jj-vcs/jj/discussions/5568
- christophilus 2y agoI’ve been using it for a bit. It is magical. I had some merge conflicts in a GitHub PR. I pulled everything down with jj, and the conflicts were gone. Pushed and presto. I do end up with descriptionless bookmarks that won’t push without a flag. So, I’m still doing something wrong. But it’s already saved me a few times this week during some gnarly refactoring and merges.
- rtpg 2y agoUnfortunately my merging experience has been mixed. I find the idiosyncratic merge markers to be overtly futzy (why are you indenting everything by a single character?), and the conflict resolution still is quite hand-hold-y. It's never been wrong, but I am slightly unconvinced at how well merge conflict resolution works relative to git + rerere.
- martinvonz 2y agoYou can try a different conflict marker style: https://jj-vcs.github.io/jj/latest/config/#conflict-marker-style https://jj-vcs.github.io/jj/latest/config/#conflict-marker-s...
- steveklabnik 2y agoIf you truly miss bookmarks moving like branches, you can give this configuration option a try: https://github.com/jj-vcs/jj/discussions/3549 https://github.com/jj-vcs/jj/discussions/3549
- rtpg 2y agoI have been finding the workflow I described to be quite helpful, because it also provides me a scratchpad that I associate to the branch. And since the tip is never the git head so when I have to fallback to git I'm "sure" I'm not operating on that. I'm still experimenting with things, but I think my overall takeaway is that in jj my working copy is "on branch", so I should lean into that rather than try to emulate my older workflows too much. And this new workflow... I just find it better!
- steveklabnik 2y agoOh yeah, I don't think your workflow is bad, you're not the first person who I've heard of give it a try. Just wanting to make sure you knew it was possible!