git: export git ref to parent branch when possible
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
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).
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.
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.