Skip to content
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: switch to new branch with guessing a remote branch to track #4

Open
kyoh86 opened this issue Jun 25, 2023 · 0 comments

Comments

@kyoh86
Copy link
Contributor

kyoh86 commented Jun 25, 2023

The switch action of the kind git_branch will checkout and detach it if it is a remote branch.

When there's a remote branch origin/foo and there no local branch foo, git switch foo can guess the origin/foo as a tracking branch.

e.g.

$ git branch
* main 1234567 [origin/main] xxxx
$ git branch --remote
  origin/main
  origin/foo
$ git switch foo
branch 'foo' set up to track 'origin/foo'.
Switched to a new branch 'foo'

Could the kind git_branch support the action like it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant