Upload folder #22578
-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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.