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
Use git -C rev-parse. It will return 0 if the directory at is a git repository and an error code otherwise.
git -C rev-parse