Skip to content

Unexpected branch switching when githubIssues.useBranchForIssues = off #7827

@yoyoys

Description

@yoyoys

There is a common workflow where we create a working branch to handle multiple issues and then deliver them together to the client.

In this workflow, it is natural to keep working directly on this branch. However, if I do not modify githubPullRequests.overrideDefaultBranch, then even when githubIssues.useBranchForIssues is set to off, I still get forced back to the default branch (e.g., main or master) whenever I try to commit. This is very disruptive.

The key problem is that I cannot arbitrarily change githubPullRequests.overrideDefaultBranch (e.g., to yoyo/this-month-works). Even if I did, the Git working directory would not remain clean. Switching branches often triggers an error such as this:
Image
This makes the workflow very inconvenient.
My only workaround is commit a stupid "setting that DON'T PUSH" to my git repo, and remove it before push every day.

My Suggestion:
Please modify the behavior of githubIssues.useBranchForIssues = off so that when this setting is applied, switching issues does not trigger unwanted branch switching.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions