Possible Duplicate:
Is there a way to get the git root directory in one command?
Let's say the repository starts at
C:\myrepo\
and the prompt is at
C:\myrepo\folderone\folderoneb\folderonec
I need a batch script that can go up until it finds
C:\myrepo.git and return C:\myrepo