Last updated 3 years ago
It's often handy in scripts to get the (absolute) path to the current git repository.
Source: LESS='-p ^\s*--show-toplevel' man git-rev-parse
LESS='-p ^\s*--show-toplevel' man git-rev-parse
git rev-parse --show-toplevel