Hacker News new | ask | show | jobs
by bvrmn 1854 days ago
May be my hints can be helpful. I have much less cognitive load developing multiple features or task switching.

    # coding some-task
    # critical bug approaches
    $ stg refresh; stg pop  # save current changes and pop patch
    $ stg new -m 'fix of critical bug'  # start working on new patch
    # fix fix fix
    $ stg refresh; git review  # commit fix
    $ stg push  # bring some-task to the table again
    # continue to coding some-task
It can look similar to branch model. But devil in details. `stg pull` allows to not think about rebases. pop/push/sink/float allows to toss around patches. I started to think in terms of atomic features and not branches and commits instead.
1 comments

I think this maps to my model when working on things too. How often I do fixups and rebase is a lot, and I effectively treat the different commits as independent patches, but having a parent (as Pijul allows).

I have also several git worktree's to facilitate working on multiple things at once though, so I don't necessarily need to switch away in my current repo, cause I just go to one of my 4 worktrees that I always have. As I explain this out loud though, it does sound like a very stopgap solution!