git-log--graph icon indicating copy to clipboard operation
git-log--graph copied to clipboard

Double click on remote-only branch to checkout/pull

Open dimateos opened this issue 5 months ago • 1 comments

Not very important, but could be nice:

Currently doing right-click checkout (or double click) on a remote branch checksout of the corresponding local one. It feels a bit weird that it gets ignored just like that.

Maybe a pop-up could warn and optionally do a pull to sync, could be a setting to do automatically too? Git graph also offest doing checkout with another branch name to avoid clash:

Image

Cheers!

dimateos avatar Jul 07 '25 08:07 dimateos

I agree this isn't optimal right now. IMO the expected thing to happen when checking out a remote branch would be the detached HEAD state, just like when you do git checkout origin/some-branch in terminal. This can also be achieved by checking out the commit itself right now, however. Adding a popup to ask for things and/or different logic for remote vs local branches is a bit delicate, as all action logic is purely JSON-based and I really want to avoid starting adding hard-coded logic now. But maybe this is resolvable using params somehow. Will need to have a closer look.

phil294 avatar Jul 07 '25 08:07 phil294