3 ms·
`cd -` to go back to the previous directory. Saved me LOTS of time over the past few months.
by why-el 13y ago
`cd -` to go back to the previous directory. Saved me LOTS of time over the past few months.
- bizarref00l 13y agopushd and popd are very useful too.
- nja 13y agoWow. Thanks for this. I always cursed myself for forgetting to pushd, and now it turns out I didn't need to!
- jamie_ca 13y agoI recently found out that zsh lets you magically popd as well, as long as you're cding deeper into the tree. If you jump to a different subtree it will pop its internal stack until it finds a parent of the target dir.
- kibwen 13y agoAnd `git checkout -` to checkout the previously checked-out branch.