3 ms·
My favourite git shortcut is "git checkout -" it mean switch back to the previous branch, so without having to remember either branch you can switch between two
by andy_ppp 6y ago
My favourite git shortcut is "git checkout -" it mean switch back to the previous branch, so without having to remember either branch you can switch between two pieces of work easily. This seems to come from "cd -" which does the same thing with the current and the previous directory.
- shric 6y agoI also like "git branch -d @{-1}" to delete the previous branch, which can of course be aliased.