JM (Jason Meridth)

JM (Jason Meridth)

Learn, Converse, Share

04 Jul 2016

Get Repository Root Path

I needed to find a way to get the path to the root of my Git repository. I found the answer in the following command:

git rev-parse --show-toplevel

Example:

->$ git rev-parse --show-toplevel
/Users/jmeridth/dev/jmeridth.github.io

Tags