Cannot upload files to github

Okay, this is the 1st time I am posting questions regarding git and github, so bear with me.
I am facing the issue of not being able to sync the local files to my github pages.
My terminal tells me everything is up to sync. But if I visit my github page, the newly created folder simply is not there.

Here’s the background. I just got my hands on this mac mini.
So I installed git using homebrew half an hour ago.
Then the 1st time I downloaded my git repo, and make changes to it, I did not set my git username and email right.
Then I tried to change it, and did manage to change it. (right now my name and email is all correctly inserted)

So the TLDR version of it is this: right now no matter how much I change the local repo and try to post it on github, git refuses to make the change for me. The files online do not change/alter in any way.

Thank you guys in advance.

My local git repo folder : (see my terminal tells me everything is up to sync)

My github pages: (see there are only 3 folders up there)

A couple of standard checks before moving forward:

1 - git remote -v and check that is actually pointing to the same url of your repo.

2 - it says nothing to commit, but have you actually pushed the changes to the url repo?

3 - are the folders empty? Git ignores empty folders by default

opps. sorry the folder was empty…

I was preparing something for later… thought I could just create them and put things to them later.


Here’s a bit more about empty directories.

If you want to commit an empty directory there is a simple workaround:

just add a .gitkeep file inside the directory.

touch my-empty-dir/.gitkeep
git add my-empty-dir/.gitkeep
git commit -m "Adding my empty directory"

Or you can specify it in the .gitignore file.

1 Like

I see. Thanks for the info.