top | item 42489013

(no title)

fprotthetarball | 1 year ago

There are still branches, but they aren't named by default. You give them names with "bookmarks", which you can push to remote git repositories as branches.

This lets you work on things without having to worry about giving it a name. This turns out to be pretty helpful when you're experimenting — just "jj new <revision>" and start editing. If it turns out to be something you want to share, "jj bookmark create <name>" and then you can push it. (You can also push without giving it a name, in which case you'll get a git branch with a name based off of the change id.)

Change IDs stay constant with each change, so you use those as a type of branch name when switching between the features you're working on.

discuss

order

J_tt|1 year ago

Adding onto this, there’s also an experimental feature to move a bookmark as you create new revisions (similar to how a git branch behaves)

pkulak|1 year ago

Oh, that would be nice. I get the reasoning not to, but it would be nice to have the option.

stavros|1 year ago

What changes the change ID? What constitutes a change? Is a change made up of many commits, or the other way around?

Superfud|1 year ago

A change ID is stable over time as you tweak the message of the change or the files edited by the change. Each of these changes become a new immutable git commit under the hood.

The fact that change ID is stable is very convenient for humans - means you have something explicit to hold on to as everything else may change over time.