How do I make a folder? #21705
-
So I would like to use Github as a place to store my python programs, and I want them organized while they are here. But I cannot find how to make a folder to keep them sorted, can I have some help? Jason |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
git doesn’t have a concept of “folders” by itself. Git tracks files and if a file happens to have a name like So if you want to create a folder within a repository, you have to create a file within it. One common way people do this is to create an empty file named To create a folder this way through the GitHub web interface, you would follow the instructions for creating files. When it comes time to name the file, you would enter I hope that helps! |
Beta Was this translation helpful? Give feedback.
git doesn’t have a concept of “folders” by itself. Git tracks files and if a file happens to have a name like
foo/bar/baz.txt
, then when git recreates the repository locally it creates thefoo
folder, thefoo/bar
folder, and then thebaz.txt
file within thefoo/bar
folder.So if you want to create a folder within a repository, you have to create a file within it. One common way people do this is to create an empty file named
.gitkeep
in the directory that they want to exist.To create a folder this way through the GitHub web interface, you would follow the instructions for creating files. When it comes time to name the file, you would enter
foo/bar/.gitkeep
. You’ll notice that each time y…