Description:
In the majority of cases whenever i want to open a file on remote (via tab context menu), a new browser tab is opened, navigating to the file hosted on the remote repository against the branch i am working on. However, in-between this process the VS Code Command Palette does not open at all, which should expose a list of selectable branches.
However, it should instead display the VS Code Command Palette, exposing the list of selectable branch names, which then when selected, opens a new browser tab and then navigates to the remotely hosted file against the selected branch. Sometimes this actually works, but in most cases, the command palette does not open..
Am i missing something here? Is there a particular condition to which the command palette does open? If so what is that condition? Or is this a bug?
Steps to Reproduce:
EXPECT --> The VS Code _Command Palette_ to open, displaying selectable branch names to open the file against (see GIF below).
ACTUAL --> The VS Code _Command Palette_ does not open, and instead the file opens up in a browser against the current working branch.

UPDATE 馃憠 : I figured out the scenario / pattern as to how to expose the VS Code _Command Palette_ to be able to select the branch of choice to open the target file against. And that is, it will only open the _Command Palette_ if your current working branch is not pushed up (i.e. current branch not available remotely). That makes sense.
However, i would prefer it if there was a configurable option for GitLens to always open the _Command Palette_ to list the branches to which i want to open the file against when i click on _Open File on Remote_.
Any plans for adding this config?
I would also love this feature - I always want to open the file on master, not my working branch.
I use this, for example, when I am referencing a code file to someone.
I would also love this feature - I always want to open the file on master, not my working branch.
I use this, for example, when I am referencing a code file to someone.
@TylerYep That is also the most common use-case for me too.
To send a reference link to someone else, of the code file sitting on the _master_ branch.
I added 2 new commands:
gitlens.openFileOnRemoteFrom) to open a file or revision on a specific branch or tag on the remote providergitlens.copyRemoteFileUrlFrom) to copy the url of a file or revision on a specific branch or tag the remote providerCan you please verify this fix in tomorrow's insiders edition? Be sure to disable/uninstall the stable version of GitLens first.
You can install the insiders edition from here.
@eamodio thanks for looking into this!
I've tried the today's Insiders edition, and noticed you've included a new very convenient context menu option; _Open File on Remote From..._, and i found this very handy, as it will list all available branches to select from (see GIF below for reference) 馃憤

@eamodio Also, as you've instructed, i'll test the two new configuration settings tomorrow, re-downloading and installing the Insiders Edition again, as today's Insiders Edition does not recognise the new configuration settings.
I suspect that i'll set the new configuration settings values like so (using branch name: master for example), within the _User Settings JSON_ file:
{
"gitlens.openFileOnRemoteFrom": "master",
"gitlens.copyRemoteFileUrlFrom": "master",
}
@Sayvai thanks for verifying. Although there are only those new commands, which show up in the menus and command palette, not any new configuration settings.
Are the new commands enough?
@eamodio Oh i see. I misread your initial comment, and realise they're just new commands!
Yes, I believe these new commands are certainly enough, as i really like the alternative command _Copy Remote File URL From..._ , it really speeds my process up when sending file reference links to the desired branch without having a new browser tab automatically open the file, amongst all the other tabs i have open 馃憤
Just for reference to others, I also attach a GIF demo of this command. Also to note, the command is only accessible via the Command Palette Cmd + Shift + P (not via the context menu)

Works perfectly 馃憣
@eamodio which stable version of the GitLens extension do you expect this to go in?
And are you able to give an estimate of when? 馃槵
Most helpful comment
@eamodio Oh i see. I misread your initial comment, and realise they're just new commands!
Yes, I believe these new commands are certainly enough, as i really like the alternative command _Copy Remote File URL From..._ , it really speeds my process up when sending file reference links to the desired branch without having a new browser tab automatically open the file, amongst all the other tabs i have open 馃憤
Just for reference to others, I also attach a GIF demo of this command. Also to note, the command is only accessible via the Command Palette
Cmd + Shift + P(not via the context menu)Works perfectly 馃憣