What\'s a shell command I can use to, using the full directory path, determine whether or not a given directory is a git repository? Specifically, I\'d like to be able to do thi
Any directory in the system could be a git working copy. You can use an directory as if it contained a .git subdirectory by setting the GIT_DIR and GIT_WORK_TREE environment variables to point at an actual .git directory and the root of your working copy, or use the --git-dir and --work-tree options instead. See the git man page for more details.