gh-branch icon indicating copy to clipboard operation
gh-branch copied to clipboard

Is it possible to list remote branches as well?

Open tnorthcutt opened this issue 4 years ago • 3 comments

Thanks for this extension! I've already found it very useful.

I'm curious: would it be possible to modify this to also include remote branches? I would be more than happy to work on adding that, but I'm honestly not entirely sure where to start.

tnorthcutt avatar Aug 26 '21 15:08 tnorthcutt

It's definitely possible, but for larger project maybe the full list of remote branches would be too much?

Anyway here is where the list of branches is fetched https://github.com/mislav/gh-branch/blob/2934ca2f5413883622aa6c18a6618d8fb8042566/gh-branch#L37

You could easily include other refs just by changing the refspec to refs/remotes/origin/** I think.

mislav avatar Aug 26 '21 16:08 mislav

@mislav Thank you for the fast reply!

Looks like if I do that, then the PR matching doesn't work. I'll poke at it a bit more... I'm not so great with bash scripting but maybe I can figure something out 😅

tnorthcutt avatar Aug 26 '21 16:08 tnorthcutt

I got this working on my fork. Let me know if you'd like a PR.

matt-bartel avatar Jun 02 '22 19:06 matt-bartel