I sort of want the equivalent of cd - for git. If I am in branch master and I checkout foo, I would love to be able to type something like git checkout - to go back to master and be able to type it again to return to foo.
Does anything like this exist? Would it be hard to implement?