Need to push EXISTING project to GitHub

Git and GitHub seems deceptively easy…

I’ve tried several times to read “very clear” blogs about “how to master” Git and GitHub. It’s been frustrating.

I finally decided to just learn how to sync up projects that I had created on my PC with GitHub (so I could then import to CodeSandBox).

I repeatedly ran into this error:
![rejected] master -> master (non-fast-forward)

So after reading some more very confusing and very intimidating StackOverflows and blogs, I tried again and it worked. After recovering from the shock, I looked back through my cmd prompt to see what went right.

This is the sequence of events, starting with the first time I errored out. Can someone please review and let me know what I did right and what I dd wrong so I can learn from this??

For now, all I want to master is how to sync up an EXISTING project (from PC) with GitHub.

Thank you so much.

Also, I wanted to test out the process of making and uploading changes, so…

  1. I updated app.js file to have an extra <p>This is a test</p>
  2. Checked local host and it showed up as expected.
  3. Then I ran git status in cmd-prompt. I expected to see app.js listed since I edited it.
  4. But I got this message:
On branch vidly routing
nothing to commit, working tree clean

Can someone help me understand what is going on?

OK…I had definitely saved it (b/c I saw the change in http://localhost:3000/) but that did trigger another thought. I have 2 projects with the same name. VERY bad I know. Cleaned it all up and now changed files are recognized in Git. Thanks!!