git: get current working dir

Solution 1:

Try this:

echo $( cd $(git rev-parse --show-cdup); pwd)

Solution 2:

Simple: git rev-parse --show-toplevel