sublime-text-git icon indicating copy to clipboard operation
sublime-text-git copied to clipboard

What's recommended commands for pulling down a remote branch?

Open thedamon opened this issue 11 years ago • 3 comments

say I am in feature branch off develop /feature-227 and I need to switch to another developer's branch on origin: origin/fix-233

Because even after fetching you can't list remote branches to 'switch' to, I don't see a way to do this with the non cli commands provided here. Is there a simple way to do this?

I'm looking for an equivalent to -- pre git 1.6.6: git chekout -b branch origin/branch post 1.6.6: git checkout branch

thedamon avatar Feb 21 '14 21:02 thedamon

:+1:

kernelp4nic avatar May 15 '14 14:05 kernelp4nic

I've experienced the same issue while needing git branch -r or git branch -a.

It doesn't currently seem to be supported, per: https://github.com/kemayo/sublime-text-git/blob/master/repo.py#L29

I'm not familiar with this repo, but at a glance, it looks like adding this to /repo.py:

class GitBranchRemoteCommand(GitBranchCommand):
    extra_flags = ['-r']
class GitBranchAllCommand(GitBranchCommand):
    extra_flags = ['-a']

It looks like tracking of remote branches is already handled via: https://github.com/kemayo/sublime-text-git/blob/master/repo.py#L80

Then adding the appropriate Sublime command entries should cover most of it.

Thoughts?

tedmiston avatar Feb 25 '15 22:02 tedmiston

My current work around is to use the Git custom command and checkout $branch but would be nice to have a native integration.

defenestration avatar Jan 04 '19 16:01 defenestration