Skip to content

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

@dscho

Description

@dscho

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions