Sublime Forum

Automatically track remote branch when switching

#1

If I switch to a remote branch on the command line, it automatically starts tracking that branch. Also, the zsh tab-completion will offer thing as a branch name even if there isn’t one locally.

$ git switch thing
Branch 'thing' set up to track remote branch 'thing' from 'origin'.
Switched to a new branch 'thing'

In sublime merge, I need to use “Create Branch From Remote Branch” for this to happen. I figured I’d get used to this behaviour but it’s been a year and it’s still pissing me off every day.

I want to:

  • Hit ctrl-b
  • Type th (which will fuzzy match to thing)
  • Hit enter

This will do the equivalent of git switch thing

0 Likes

#2

@icholy, the new(ish) checkout command combines the different checkout/switch behaviors into a single command. Now the flow is:

  • hit ctrl/cmd+b
  • type thing
  • choose Create local commit
1 Like