问题:
Mercurial has a way of printing the root directory (that contains .hg) via Mercurial有一种打印根目录(包含.hg)的方法
hg root
Is there something equivalent in git to get the directory that contains the .git directory? 在git中是否有类似的东西来获取包含.git目录的目录?
解决方案:
参考一: https://stackoom.com/question/41CS/有没有办法在一个命令中获取git根目录参考二: https://oldbug.net/q/41CS/Is-there-a-way-to-get-the-git-root-directory-in-one-command
来源:oschina
链接:https://my.oschina.net/u/4438370/blog/4276264