Is there any way how to check whether git repository exist just before perform git clone
action? Something like git clone $REMOTE_URL --dry-run
?
I would like to implement fast checking method which will check existence before the clone action will be performed. I expect that connection might be slow and repository might be big even more than 1GB, so I don't want to rely on time extensive operation due to simple validation. The clone will be performed asynchronously in the background when validation passes.
I found this https://superuser.com/questions/227509/git-ping-check-if-remote-repository-exists but it works from git repository context after initial clone action is done.
Maybe there is some git call which works without git repository context and return "some data" if repository on destination exist or error if doesn't.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…