top | item 45085620

(no title)

wocram | 6 months ago

What is the replacement for `git branch --set-upstream-to`?

discuss

order

a022311|6 months ago

Unfortunately there is no replacement for it and I miss the feature too. The docs [1] mention:

> Unlike in Git, the remote to push to is not derived from the tracked remote bookmarks. Use `--remote` to select the remote Git repository by name. There is no option to push to multiple remotes.

I think this was an explicit design decision, which I'm guessing might be because bookmarks in other storage backends (non-git) may not have a notion of an upstream URL. I'm no expert on this, you'll probably get a better answer by asking the maintainers themselves.

Currently the best you can probably do is creating an alias to push a branch to a specific remote to save you some keystrokes. I hope that helps!

[1]: https://jj-vcs.github.io/jj/latest/cli-reference/#jj-git-pus...

wocram|6 months ago

In git remote branches have no notion of an upstream branch either, it's a fully local construct you end up responsible for annotating.