This has been asked before, Is there a way to get the git root directory in one command? Copying @docgnome’s answer, he writes
cd $(git rev-parse --show-cdup)
Make an alias if you like:
alias git-root="cd $(git rev-parse --show-cdup)"
This has been asked before, Is there a way to get the git root directory in one command? Copying @docgnome’s answer, he writes
cd $(git rev-parse --show-cdup)
Make an alias if you like:
alias git-root="cd $(git rev-parse --show-cdup)"