Github repo doesn't update changes

Hello everyone, first of all, I need to say that I’m very glad to be part of the community!

So, I am very inexperienced when it comes to using github and today I started with new iOS project on which I wanted to learn github basics.

What I have done:

  1. Created repo on github
git init
git add .
git commit -m "my first commit"
git push -u origin master

After that, I’ve added some files and folders and did following:

git add .
git commit -m "added folders"
git push -u origin master

I looked at my github repo, and none of these changes had been made(neither folders nor files were added).
What am I doing wrong?

Thanks in advance! :pray:

I’m not seeing any command where you configure the origin remote. Unless you forgot that when describing what you did git wouldn’t know where to push, which would explain why your data isn’t showing up.

You can add the remote with a command like this:

git remote add origin URL

Where the URL for a repository on Github is something like for SSH or for HTTPS (replace “user” and “repository” with your data).

If that’s not the problem, could you share the output of the push commands so we can get a better idea of what’s going on?

1 Like

Thanks for reply!

I came across solution - branch was on “main” not on master.

1 Like