[英]Check if a git repo exists in a shell script
Is there a way to check if a git repo exists using a bash or csh script? 有没有办法检查使用bash或csh脚本是否存在git repo? I know that we can use git ls-remote <repository>
to check the existence of the remote repo. 我知道我们可以使用git ls-remote <repository>
来检查git ls-remote <repository>
是否存在。 But I'd like to somehow do this programatically in a shell script. 但我想以某种方式在shell脚本中以编程方式执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.