This file is empty


New to Github, so bear with me.

I tried to commit a file in a dir in a repo. Some folders are ‘ignored’ with the error ‘This file is empty’. On the desktop app I therefor cannot commit.
I tried to upload the file manually through the website through dragging and dropping, but I equally get the message, this file is empty.

The folder in fact is far from empty, containing partial html blocks as used in HUGO. I have no gitignore at all.

I tried to create a new repo, but with the same result.

Any pointers to resolve/understand what’s going on?

The file in itself was not empty.

The solution in the end was to manually add the folders, for the specific folders/files were not added ‘automatically’ along with all the other files. It remains a mystery to me why some are ignored and some are simply added. Will need to read into it.

This is incorrect. Git can handle empty files like any other file, only empty directories cannot be added.

I just tested it again, empty folders are not allowed, empty files can be. I’m referring to GitHub Web UI.

I’m not sure if you are using Git for that.

pardon for this, I’m referring to empty folders not empty files,