Hacker News new | ask | show | jobs
by tytso 4675 days ago
Note that "git rev-parse --show-cdup" return the empty string if you are at the top of the git repo. So "cdg" as defined above will drop you in the hope directory if you are already at the top of your git tree.
1 comments

Yup. Perhaps `git rev-parse --show-toplevel` is better for this alias.