Replies: 2 comments 2 replies
-
Only if you're not tracking the remote branch. Tracked remote branches default to mutable. |
Beta Was this translation helpful? Give feedback.
-
As for hiding stale branches from your default log view instead of abandoning them, you can add a text tag to the description that makes it easy to filter them out, or I've seen an example (though I don't recall precisely where) of just doing it based on age.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My git workflow involves accumulating and refining changes into a topic branch with a lot of
git add -p
s,git commit --fixup
s,git rebase -i --autostash --autosquash
es andgit push -f HEAD:refs/heads/topic-branch-name-here
(I often don't know what I'm working on exactly until after I'm done with it, so I tend to prototype on top of trunk a lot). Lather, rinse, repeat, until the topic branch is perfect, or at least good enough to be accepted and merged into branch by whatever git forge.Jujutsu seems to be really compatible with my workflow, so I've been giving it a try.
jj split
in particular is super attractive. Runningjj new
beforegit push
is at least a little weird, but I can deal with it. So far, so good.However, under default configuration, the moment I push my changes to source control, jj immediately considers my work to be "shared," and thus "immutable," even though it still needs to pass CI, review, be rebased, etc. a bunch.
If I don't want to be typing in a lot of
--ignore-immutable
's, I'd have to teach jj that topic branches are mutable."Sure," I say, and type something along the lines of
jj config set --repo 'revset-aliases."immutable_heads()"' "root()..main@origin"
. Except now every single one of my coworker's topic branches are now mutable (something honestly I could live with...); distressingly, this also means that approximately all of them now show up injj log
!I thought
jj log
showed all mutable commits, butjj config get revsets.log
tells me reality is a bit more complex than that, so I'm not sure I'm equipped to figure out a better revset. So, for now, I'm instead settling forjj config set --repo 'revset-aliases."immutable_heads()"' "root()..main@origin | ~mine()"
as an approximation of what I want: treat just other people's commits as immutable, and then I get to hide topic branches that I've given up on withjj abandon
.However, there doesn't seem to be an obvious way to un-
abandon
work? What do I do if a topic branch I was working on becomes relevant again? Do I have a better alternative here than declaring jj-bankruptcy and runmv .jj .jjj && jj git init --colocate
?I'm glad I've figured out as much as I have on my own, but I think I might be zooming into a local optimum that's a little too... unidiomatic and inergonomic. So I'm welcoming feedback on what I could do to let me workflow be jj-ier, and/or how could I make jj be bp-ier.
Beta Was this translation helpful? Give feedback.
All reactions