title: Bash - check if repository exists
body: <p>I am trying to create if statement which will check if repository with name X exists, if it doesn't =&gt; create it.</p>
  <p>Made following code. It works, but when repository doesn't exists, then it shows error. I couldn't find any ways of removing that error in console. Make I was using &amp;&gt;/dev/null not in correct way...</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    myStr=$(git ls-remote https://github.com/user/repository);
      if [ -z $myStr ]
      then
          echo "OMG IT WORKED"
      fi</code></pre>
  </div>
  </div>
  </p>