Mercurial has a way of printing the root directory (that contains .hg) via
hg root
Is there something equivalent in git to get the director
Has --show-toplevel only recently been added to git rev-parse or why is nobody mentioning it?
--show-toplevel
git rev-parse
From the git rev-parse man page:
--show-toplevel Show the absolute path of the top-level directory.