Skip to content

Conversation

@arxanas
Copy link
Owner

@arxanas arxanas commented Jan 25, 2023

Closes #673.

Since adding auto-branch-switching, the behavior of `git sw` with no arguments has become somewhat inconsistent. You would expect that it would check out the current branch, if any, and otherwise leave the working copy unchanged, but the current behavior is to open the interactive commit switcher. This commit changes the behavior of `git branchless switch` to require the `-i` flag to invoke the interactive commit switcher.

If the user really wants to open the interactive commit switcher, they can create their own alias to `git branchless switch -i`.
…chless switch`

- For intelligibility.
- We'll be passing `--detach` to `git checkout`, which has no short-form, so this change improves consistency.
@arxanas arxanas enabled auto-merge (rebase) January 25, 2023 22:50
@arxanas arxanas merged commit 13f7f39 into master Jan 26, 2023
@arxanas arxanas deleted the arxanas/switch branch January 26, 2023 04:58
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 this pull request may close these issues.

Interactive git sw does not switch to branch associated with currently detached commit

2 participants