Do you mean "upstream" and "origin" branch names or #git remotes?

Reply to this note

Please Login to reply.

Discussion

I think the author want to dynamically set remote=upstream (for the main branch), if remote exists. Otherwise set remote=origin.

I don't it's possible without writing some bash+git aliases :\