jj icon indicating copy to clipboard operation
jj copied to clipboard

git: export git ref to parent branch when possible

Open jakobhellermann opened this issue 8 months ago • 3 comments

This is helpful for

  • editors with git integration that show a warning when on an detached head (intellij etc.)
  • using git and jj together on a repository

It is only done if there is a single parent with a single bookmark, otherwise it wouldn't be obvious which one to pick.

Checklist

  • [ ] I have updated CHANGELOG.md
  • [ ] I have added/updated tests to cover my changes

jakobhellermann avatar May 15 '25 15:05 jakobhellermann

Another option is to always create/update a jj-specific branch. We could call it something like jj-<workspace id> (since there can be multiple workspaces).

martinvonz avatar Oct 04 '25 19:10 martinvonz

Another option is to always create/update a jj-specific branch. We could call it something like jj-<workspace id> (since there can be multiple workspaces).

I think this wojks be nice. It has the advantage that it can work even if you don’t use bookmarks.

AngelEzquerra avatar Oct 05 '25 06:10 AngelEzquerra

Another option is to always create/update a jj-specific branch. We could call it something like jj-<workspace id> (since there can be multiple workspaces).

FWIW I’ve been trying this approach manually ha today (by doing git branch --force jj-default followed by git switch jj-default after every jj new operation) and it works really well.

AngelEzquerra avatar Oct 06 '25 17:10 AngelEzquerra