Skip to content

Comment on The Jujutsu version control systemparent

Comments

In jj, pulled commits are immutable by default. Commits that you author are mutable until you push them.

If I'm on a project with change AAA -> BBB, suppose my friend authors CCC and I author DDD.

So my history looks like:

    AAA  ---->  BBB  ---->  DDD
    (immutable) (immutable) (mutable)
And my friend's has:
    AAA  ---->  BBB  ---->  CCC
    (immutable) (immutable) (mutable)
But then my friend pushes their change first. So when I pull, I'll have:
    AAA -> BBB -> CCC (immutable)
            \
             '-> DDD (mutable)
Just like git, I then rebase my commit by saying `jj next` (mnemonic: "move this commit to its next descendant") to get
    AAA -> BBB -> CCC (immutable) -> DDD (mutable)
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.