title: Git - New repo allows me to "pull origin main" but cannot commit with "push origin main" and gives an error
body: <p>It's been a minute since I've used git/github, and things seem to have changed a bit.</p>
  <p>I set up a new repo on GitHub (with <em>readme</em>), then created a matching directory on my computer that I'll be working out of.</p>
  <p>Opened the terminal in that matching directory...</p>
  <pre><code>git init
  git remote add origin https://github.com/(username)/(reponame).git
  git pull origin main
  </code></pre>
  <p>I got a warning about...</p>
  <pre><code>&quot;Pulling without specifying how to reconcile divergent branches is discouraged.&quot;
  </code></pre>
  <p>but otherwise the pull worked fine and the <em>readme</em> is now in my local directory.</p>
  <p>Obviously I have the correct &quot;username&quot; and &quot;reponame&quot; in the commands.</p>
  <p>BUT then to make sure all is well, I modified the <em>readme</em> and tried to push it to the repo...</p>
  <pre><code>git add -A
  git commit -m &quot;First commit, updating readme&quot;
  git push origin main
  </code></pre>
  <p>and received the error:</p>
  <pre><code>error: src refspec main does not match any
  error: failed to push some refs to 'https://github.com/(username)/(reponame).git'
  </code></pre>
  <p>Looking at the repo online, there is only one branch: <em>main</em></p>
  <p>And in the terminal when I check...</p>
  <pre><code>git show-ref
  </code></pre>
  <p>I get two outputs...</p>
  <pre><code>5...(redacted)...e refs/heads/master
  c...(redacted)...0 refs/remotes/origin/main
  </code></pre>
  <p>If I try the command</p>
  <pre><code>push origin master
  </code></pre>
  <p>there is no error, but it creates a separate branch on the repo.</p>
  <p>So, needless to say, I'm completely lost and have no clue what's going on.</p>
  <p>Thanks for any suggestions.</p>