title: Check if a git repo exists in a shell script
body: <p>Is there a way to check if a git repo exists using a bash or csh script? I know that we can use <code>git ls-remote &lt;repository&gt;</code> to check the existence of the remote repo. But I'd like to somehow do this programatically in a shell script.</p>