git init been run on the directory? Here’s how you find out.
Git initialization of an existing directory with the command
git init results in a subdirectory that is named
.git. It contains your git goodies. To determine whether the directory has been git initialized, simply check for the presence of the
.git subdirectory. Here’s how to do it with C or C++:
1 2 3 4 5 6 7 8 9 10
Directory Exists in Other Languages
Trying to do this in another language? A quick search for “directory exists” in your language du jour generally leads to the information that you need.