3 ms·
I more or less use the method described [here](https://steveklabnik.github.io/jujutsu-tutorial/advanced/simultaneous-edits.html https://steveklabnik.github.io/j
by oscillonoscope 10mo ago
I more or less use the method described [here](https://steveklabnik.github.io/jujutsu-tutorial/advanced/simultaneous-edits.html https://steveklabnik.github.io/jujutsu-tutorial/advanced/sim...) for branches. One thing I do change is that I set the bookmark to an empty commit that serves as the head of each branch. When I am satisfied with a commit on head and want to move it to a branch I just `jj rebase -r @ -B branch`. When I want to create a new branch it's just `jj new -A main -B head` and `jj bookmark set branch_name -r @`
- conradludgate 10mo ago_Every time I see one of these nifty jj tricks or workarounds I find myself wondering, “why not just use git?”_
- steveklabnik 10mo agoHow would you do this in stock git?
- wild_egg 10mo agoI might just not be following correctly but committing in git just carries the branch along for the ride, so there's nothing to do in git for this scenario. IIRC forcing some specific branch name to point to my changes with `jj` was non-obvious and what made me give up and go back to git when I tried it last year.
- oscillonoscope 10mo agoYou are mistaken. In the workflow I described, I am making changes on top of all branches at once and then deciding which branch to send the new commit to. This allows me to make changes simultaneously to both branches without friction.