You can use the -C
switch for that. From the manual:
-C <path>
Run as if git was started in
<path>
instead of the current working directory. When multiple-C
options are given, each subsequent non-absolute-C <path>
is interpreted relative to the preceding-C <path>
.
This feature was added in Git 1.8.5.