I wanted a simple git command to go up to the \"root\" of the repository.
I started with a script, but figured that I cannot change active directory of the shell, I
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)'