Is there any way to create a shortcut for git checkout
such that you can git checkout <number_of_branch_in_list_of_branches>
For example, I would like to do the following sequence:
$ git branch
1. first_branch
2. second_branch
3. third_branch
$ git checkout 2
You are now on branch "second_branch"
I have seen some shortcuts dealing with git checkout @{-num}
but, from what I have seen, that is in reference to past branches. I don't care about my previous branch history but representing branch names by the order in which they are listed after doing git branch