Cd-to-root: Easily Cd to the Root of Your Project
github.com
github.com
For instance, I'd probably tackle this by defining an environment variable to match my root directory, like $PROJROOT. I could then "cd $PROJROOT" in my shell. And if I really wanted the one-character command used by the solution above, I could say "alias a 'cd $PROJROOT'".
And this allows extensions. For instance, now that I have a $PROJROOT variable, I'm not limited to using "cd" on it; I can pass it off to anything that might use the root ("pushd", "ls", etc.). Similarly, I can reapply the alias technique to add short-cuts for any of those additional actions.