Last Updated: February 25, 2016
·
823
· reidransom

Change Directory to Your Git Root

Add this to your ~/.zshrc or whatever:

alias cdg='cd $(git rev-parse --show-toplevel)'

Then run source ~/.zshrc and you'll be able to cd to the root of your current git repo with cdg.