title: github how to fix error: refname refs/heads/new_branch not found
body: <p>I'm really new to GitHub.</p>
  <p>I made my first project and want to add it to GitHub. But when I try to add my project to GitHub I'm getting the following error and I couldn't find a way to fix it.</p>
  <p><code>git branch -M main</code></p>
  <blockquote>
  <p>error: refname refs/heads/new_branch not found</p>
  <p>fatal: Branch rename failed</p>
  </blockquote>
  <p>Any help will be appreciated.</p>