Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 3

Upload folder

I want to upload a folder to my Github repo, but I can't and instead have to individually upload each folder because Github doesn't allow uploading folders. Is there any way I can upload an existing folder?

2 Replies
Highlighted
Commander Lvl 1
Message 2 of 3

Re: Upload folder

You can create a file called "readme.md" in every empty folder you want upload. This method can allowed also to describe, in that file, what si the purpose of the folder.
Copilot Lvl 2
Message 3 of 3

Re: Upload folder

For clarity, this isn't necessarily a limitation on GitHub itself so much as how git itself handles files and folders.

 

I suppose a reamde file could do the trick, but if all you want is to assure a folder is present then it might be a bit much.  Another approach I've sometimes seen people do is add a .keep file to the folder, which is just a text file that serves no other purpose than to give the git client something to include for that folder in a commit.  It could be empty, or it could hold information as to why it needs to be kept around.