title: error: src refspec main does not match any error: failed to push some refs to <url>
body: <ol>
  <li>To get practice with Github, I created a new directory on my computer that I wanted to push to Github.</li>
  <li>I added a .csv file and nothing else.</li>
  <li>I created a new repo on Github without initializing a README.</li>
  <li>I cd'd into the directory then used the following commands in Terminal:</li>
  </ol>
  <p><code>git init</code></p>
  <p><code>git add file1.csv</code></p>
  <p><code>git commit -m &quot;First commit&quot;</code></p>
  <p><code>git remote add origin &lt;Github url from Quick Setup page&gt;</code></p>
  <p><code>git push -u origin main</code></p>
  <p>And I got the following errors:</p>
  <p><code>error: src refspec main does not match any</code></p>
  <p><code>error: failed to push some refs to &lt;url&gt;</code></p>
  <p>I searched for a solution and I came across this: <a href="https://stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to-remote">git error: failed to push some refs to remote</a>
  The answer selected says:</p>
  <blockquote>
  <p>If the GitHub repo has seen new commits pushed to it, while you were
  working locally, I would advise using:</p>
  </blockquote>
  <blockquote>
  <p><code>git pull --rebase origin master</code></p>
  </blockquote>
  <blockquote>
  <p><code>git push origin master</code></p>
  </blockquote>
  <p>What I don't understand is, why did this happen with a <strong>new</strong> directory on my computer and a <strong>new</strong> repo? No commits were made to the repo on Github so why should I have to <code>git pull</code>? I even tried doing this with a new empty directory and new empty repo (again) and I got the same result.</p>