Comment

Comment by Filligree

One really nice trick you can do is:

- Create multiple topic branches, one for each thing you're working on.

- Now you probably want to work on item A while having B and C all available, so make a single merge commit (jj new a b c) to build on top of.

- Create further commits on top of that, while you're working.

- When you're cleaning up (ideally often), use squash --to or rebase --after to move those commits back the branch they belong on. This does not invalidate the merge commit; you will, effectively, have multiple branches checked out at once.

EDIT: This is apparently called the 'megamerge workflow'.

parent Filligree 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton