Skip to content

Consider ways to help with git switch @{-<n>} where <n> is unknown #403

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

Open
dscho opened this issue Oct 16, 2019 · 0 comments
Open

Consider ways to help with git switch @{-<n>} where <n> is unknown #403

dscho opened this issue Oct 16, 2019 · 0 comments

Comments

@dscho
Copy link
Member

dscho commented Oct 16, 2019

There is a very convenient way to switch back to the previous n-th branch in the current worktree, e.g. after git switch next; git switch pu; git switch master; git switch --detach, git switch @{-3} switched to next (i.e. the 3rd-last branch in this worktree).

I frequently forget which branches I checked out, in which order, though, so I would need some help with determining the correct n.

Maybe this is a good opportunity to implement sort of an interactive mode for git switch, where I could pick from the list of recent branches.

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

No branches or pull requests

1 participant