I'm trying to understand the logic behind the "View Remote" menu command. I have multiple GitHub and GitEnterprise remotes defined and just want to know which one it will pick and why. I mean I can deal with whichever it ends up with, but it doesn't seem consistent to me and I would like to have a more consistent workflow. Any help would be greatly appreciated.
Welcome to the Atlassian community!
The "View Remote" command uses the tracking remote of the currently checked-out branch to determine which URL to open. If that branch has a configured upstream (e.g., origin/main), it opens that remote's URL in the browser.
When the current branch has no tracking remote set, which is common for local-only branches, Sourcetree falls back to the first remote it finds, and the ordering there can feel arbitrary, which explains the inconsistency you're seeing.
Explicitly set the upstream for each branch. In Sourcetree, right‑click the branch and choose Set Upstream (or use Branch > Set Upstream), then select the remote and branch to track. After that, “View Remote” will always open the correct remote for that branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.