I've seen this question, which tells how to get the path of a particular file relative to the root of the git repo. But I now want to get the path of the current directory, not a specific file. If I use
git ls-tree --full-name --name-only HEAD .
$ git rev-parse --show-prefix
--show-prefix When the command is invoked from a subdirectory, show the path of the current directory relative to the top-level directory.