I'd like to know whether a remote repository exists. Here's what I came up with:
git ls-remote -h "$REPO_URL" &> /dev/null
Is there any better way?
git
I'd like to know whether a remote repository exists. Here's what I came up with:
git ls-remote -h "$REPO_URL" &> /dev/null
Is there any better way?
Best Answer
I think the
git ls-remote
command is pretty much made for that purpose.