title: Git push error - failed to push some refs to <path>
body: <p>I am trying to upload my code onto a repository I created on github but I get an error.
  Assuming the URL of the repository is <a href="https://github.com/a" rel="nofollow noreferrer">https://github.com/a</a>, how do I go about uploading my code to my remote repository?</p>
  <p>I tried the following commands on git bash after navigating INSIDE the folder I want to upload -</p>
  <pre><code>git init
  (output - Reinitializing existing Git repository in C://(path)/.git/
  
  git add.
  (blank output)
  
  git commit -m &quot;Initial commit&quot; 
  (output- On branch main. nothing to commit, working tree clean)
  
  git remote add origin https://github.com/(path).git
  (output - error: remote origin already exists) 
  
  git push origin master
  (output - error:src refspec master does not match any
  error failed to push some refs to https://github.com/(path).git)
  </code></pre>
  <p>Why is this happening and what could I do to push my code to my remote git repo? (I want to learn how to use git via cmd)</p>
  <p>Thanks for reading my query!</p>