A quick tip showing how to switch back to the previously checked-out Git branch using `git checkout -` (shorthand for `git checkout @{-1}`). The post explains the underlying syntax from Git documentation, provides a concrete example with multiple branches, and suggests a shell alias `alias g-='git checkout -'` for even faster navigation. Available since Git 1.6.2.
Sort: