Replies: 2 comments 2 replies
-
...come to think of it, I don't actually see how to update the
Well, of course I don't want to track |
Beta Was this translation helpful? Give feedback.
-
Unlike Git, jj's local branch
I think you can use |
Beta Was this translation helpful? Give feedback.
-
I was trying to update a branch in my fork to resolve conflicts. After rebasing onto
main@origin
and resolving the conflict, I usedjj git push
, which...created a branch inmartinvonz/jj
rather than updating the remote from which I was tracking the branch.As far as I know,
jj branch
doesn't have any way to delete a branch remotely without deleting it locally, or to specify only a particular remote on which to delete the branch. So I simply usedgit push --delete origin descendants-range
.But that caused
jj
to try to delete the branch anyway (note that the branch name is not present in thestatus
output):This feels similar to #2504 in that it's a surprising (to me) change to the
jj
state that is automatically and unavoidably applied based on a change in thegit
state. But in this case, I'm frankly kind of baffled by the behavior:jj git branch track <name>@personal
. Why didjj git push
decide to push toorigin
rather thanpersonal
? I rebased ontomain@origin
rather than trackingmain@origin
and rebasing onto (local)main
, but I don't see why that would affect which remote is used for tracking.git push --delete
does not delete the local branch. So why did importing the git changes delete the localjj
branch?jj
branch was deleted, it was...very hard to recover. I understand whybranch track
is a no-op when the branch is marked for deletion (though the warning message should probably mention that), but there doesn't seem to be any good way to un-mark a branch for deletion.jj git fetch
simply gave meNothing changed
(which seems weird because I actually started withpersonal
as the only remote and addedorigin
later, so thefetch
default must be based on the nameorigin
itself?), so I had to explicitly dojj branch forget descendants-range; jj git fetch --remote personal; jj branch track descendants-range@personal
.Beta Was this translation helpful? Give feedback.
All reactions