title: I tried to git code to github repo with git but it is not working
body: <p>I have been trying to create a repo to github through git, but I couldn't do it, these are the steps I did:</p>
  <pre><code>git init
  git add .
  git commit
  git push
  </code></pre>
  <p>and this is the message I get:</p>
  <pre><code>fatal: The current branch main has no upstream branch.
  To push the current branch and set the remote as upstream, use
  
      git push --set-upstream origin main
  </code></pre>
  <p>when I use the command I get nothing:</p>
  <pre><code> git push --set-upstream origin main
  </code></pre>
  <p>another thing, sorry if it sounded stupid but I really want to understand, the first time I configured git on my PC it connected with github, but when I upgraded my OS even if I tried to configured it again I couldn't, I configured my username but it didn't appears on the git window</p>