Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
why-el
on Sept 10, 2013
|
parent
|
context
|
favorite
| on:
Unix Commands I Wish I’d Discovered Years Earlier
`cd -` to go back to the previous directory. Saved me LOTS of time over the past few months.
kibwen
on Sept 10, 2013
|
next
[–]
And `git checkout -` to checkout the previously checked-out branch.
nja
on Sept 10, 2013
|
prev
|
next
[–]
Wow. Thanks for this. I always cursed myself for forgetting to pushd, and now it turns out I didn't need to!
jamie_ca
on Sept 11, 2013
|
parent
|
next
[–]
I 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.
bizarref00l
on Sept 10, 2013
|
prev
[–]
pushd and popd are very useful too.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: