I have a remote branch remote-branch-long-name
. When I magit checkout with helm completion I can type remote-branch
and origin/remote-branch-long-name
will show up as an option. The issue is that to checkout this branch locally, I actually cannot switch to that branch, I need to switch to remote-branch-long-name (without the origin/ prefix)
, since helm doesn't provide that as a completion option, I have to manually type the entire branch name out.
Is there another function I should be using for this use case or do I have to hack a function together?
git checkout foo
, andfoo
is not a branch, butorigin/foo
is, git will create a new branchfoo
and set it to trackorigin/foo
. So git teaches you to think "I just checkoutfoo
, and git does everything necessary". But this does not work with magit; runningmagit-branch-and-checkout
is the way to go. – zck Feb 22 '18 at 20:56