Add remote branches to git switch completion#224
Merged
Conversation
Wire the refs_remote_branches generator into the git switch subcommand's first positional arg so remote branch names are suggested alongside local branches. This matches git switch's default --guess behavior, which creates a local tracking branch from a uniquely-named remote branch. Fixes APP-3485. Co-Authored-By: Oz <oz-agent@warp.dev>
APP-3485 [git] Add remote branches to git switch completion
Add remote branches to See GitHub #1980, #4140 |
Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
This reverts commit b75c4fc.
vkodithala
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add remote branches to
git switchcompletions. Previously, only local branches were suggested when typinggit switch <tab>. Now, remote branch names (without the remote prefix) are also suggested, matchinggit switch's default--guessbehavior which creates a local tracking branch from a uniquely-named remote branch.Changes
git switchsubcommand's first positional arg ingit.jsonto use bothlocal_branchesandrefs_remote_branchesgenerators (previously onlylocal_branches).Screenshot
git switchnow shows remote branches (bugfix-remote-gamma, feature-remote-alpha, feature-remote-beta) alongside local branches:Testing
Fixes APP-3485.
Conversation: https://staging.warp.dev/conversation/21d356e2-2c44-4756-afd2-498c2abb3a37
Run: https://oz.staging.warp.dev/runs/019d4b03-75ea-74ee-b255-25b8c3efd97c
This PR was generated with Oz.