New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Checkout Remote Branch #390

Closed
randomPoison opened this Issue Dec 11, 2014 · 4 comments

Comments

Projects
None yet
6 participants
@randomPoison

randomPoison commented Dec 11, 2014

In git-cola, going to branch > checkout only lists local branches. It would be nice if it would also list remote branches and would automatically create a local tracking branch if one doesn't already exist. Currently it seems like the only way to checkout a remote branch through git-cola is to go to branch > create and select a remote branch as the starting point.

@Vdragon Vdragon added the help wanted label Dec 12, 2014

@dmccuskey

This comment has been minimized.

Show comment
Hide comment
@dmccuskey

dmccuskey commented May 6, 2015

+1

@djhaskin987

This comment has been minimized.

Show comment
Hide comment
@djhaskin987

djhaskin987 Sep 11, 2015

I like how git cola tracks very closely with the git commandline. This is one example. Git does not let you actually checkout a remote branch. Instead, when you run "Git checkout ", it figures what you wanted to do was create a banch to track a remote branch.

How does git cola even know from which remote you want to track? git checkout <remotebranch> only works because git assumes you mean the remote origin. What if you have two remotes? What will the branch name be? I don't know if a dialogue other than the current "Create branch" dialog would be useful here.

I think the improvement to make here is to add a menu entry branch > checkout remote..., which would pop up the "create branch" dialogue with appropriate defaults set in that dialogue. That way the dialog can more easily present a list of the remote branches and the user would not be confused.

djhaskin987 commented Sep 11, 2015

I like how git cola tracks very closely with the git commandline. This is one example. Git does not let you actually checkout a remote branch. Instead, when you run "Git checkout ", it figures what you wanted to do was create a banch to track a remote branch.

How does git cola even know from which remote you want to track? git checkout <remotebranch> only works because git assumes you mean the remote origin. What if you have two remotes? What will the branch name be? I don't know if a dialogue other than the current "Create branch" dialog would be useful here.

I think the improvement to make here is to add a menu entry branch > checkout remote..., which would pop up the "create branch" dialogue with appropriate defaults set in that dialogue. That way the dialog can more easily present a list of the remote branches and the user would not be confused.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Sep 12, 2015

Member

very true. These sound like they'd be good improvements.

Member

davvid commented Sep 12, 2015

very true. These sound like they'd be good improvements.

@wolftune

This comment has been minimized.

Show comment
Hide comment
@wolftune

wolftune Sep 21, 2015

This answer above seems to misunderstand. It would be nice to be able to do just like in the CLI git checkout remotename/branchname which does not make a new branch, it puts you in detached HEAD and lets you look at the remote files. Git-cola should support that, and it doesn't right now.

wolftune commented Sep 21, 2015

This answer above seems to misunderstand. It would be nice to be able to do just like in the CLI git checkout remotename/branchname which does not make a new branch, it puts you in detached HEAD and lets you look at the remote files. Git-cola should support that, and it doesn't right now.

davvid added a commit that referenced this issue Sep 24, 2015

completion: add a completion model for "potential" branches
Potential branches are branches that exist remotely but do not yet exist
locally.  These branches are offered for completion in addition to
existing git refs.

Related-to: #390
Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in a14e674 Sep 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment