Beginners question

Hi all!

is it possible to make folders in a repository? or i need to create a new repository for each project?

as example:


can i create folder trees in a repo or I need to create a separate one?

1 Like

You can, no problem with that. What you can’t do is to add empty folders.


Git doesn not track empty folder (as @airtower-luna mentioned), but if you wish to add empty folders to your project (as placeholder) you’ll need to add at least one file in them, even if empty — it’s customary among Git users to name such a file .gitkeep, which most Git users will know it’s just an empty file intended to force Git to track empty folders (it’s name is just an arbitrary convention, nothing more).

To create that empty file just open the terminal in the folder (Git for Windows ships with Bash) and type:

touch .gitkeep

and then add it to the repository.

Of course, once you start adding contents to the folder, you can safely delete the .gitkeep file.


Thanks for the snswer! Since Im a complete beginner, learning all by myself git and github so far looks for me as something… not quite understandable😅 hopefully it will get cleared with time


I noticed that it’s your cake day @tajmone! Congratulations and thanks for continuing to be such a helpful part of the community :bowing_man:


Don’t worry @Eldorado82, we’ve all been there — Git has a bumpy learning curve, the hard part is managing to grasp a few key concepts and figuring out how they piece together, when that happens you’ll have that “Eureka!” moment were everything falls in place and the big picture suddenly makes sense. Just persevere using Git and GitHub on a daily basis, facing one problem at the time and finding tutorials that will help you grasp the specific problem. In my personal experience, this has worked better than diving into Git books, because I needed to learn how to do carry out specific tasks.

GitHub simplifies working with Git thanks to its layers of additional services which are designed to enhance collaborative efforts — but yes, indeed there’s plenty to learn on that side too, especially if you want to make the most out of it. Participating actively to projects is the best choice to learn both Git and GitHub, for you get the chance to see others at work using these tools.

I’m happy to give back to the community what I can. When I first joined GH 5 years ago, I didn’t have a clue what Git was, and it’s only thanks to the support from other users (and the good documentation too) that I’ve managed to find my way through the maze of FOSS collaboration. This has been a truly empowering experience, and I’ve learned that we all stand on the shoulders of those who preceded us in similar endeavors, and that the true spirit of collaboration is not valued by mere skills and know-how, but in the willingness to share and make room for others — especially new arrives.

After all, what we ultimately share with each other is our time — and I’ve come across so many professional developers (from the “big leagues”) willing to share their precious time to freely help others, that I’ve come to appreciate the open spirit that fuels this community, which is not based on ranks of competence but commonality of interests.


Participating actively to projects is the best choice to learn both Git and GitHub

It is a light ywars away,just began learning html/css 2 weeks ago. So “participating” going to happen somewhere in future

1 Like

I began by helping projects with their documentation, and/or internalization (aka “i18n”, i.e. translating interfaces or documents to other languages) — there’s always a demand for help in these, and by volunteering to them you’re relieving the maintainers and allowing them to spend more time coding.

On your side, it’s a good way to focus on learning how to use Git and GitHub, and only requires natural language skills on your side to help with documentation and i18n. In my experience, it offered me the opportunity to get involved in projects I liked, be helpful and introduce me to the community — and, needless to say, mutual help is what GitHub is all about.


Another issue that I discovered right now (after understanding the proper way of getting folders inside my repo)-- big shutout to @airtower-luna and @tajmone-- THANK YOU!

is there a way of arranging the folders in chronical order? ( i think that it’s not possible0- as example

if I want to get my folders by chronological order, but as you open them in the repo it goes in reverse- i mean the first folder I added is going to be the last one ( not the first one)
so is it possible to change it… or not?

You can go to GitHub learning lab ( if you want to learn GitHub deeply with plenty of examples and doing all by yourself. It also includes some bit of Git.

There is no inherent order of directories in the repository. How they are shown depends on the tool you’re using. The git command line tools generally sort files alphabetically, other tools may offer other options.

Thanks for sharing this amazing information.

I created a few beginner videos that only use like 15 lines of code to help out beginners. Here’s the playlist if you are interested. I use visual studio and visual studio code and just show the basics without the command line just to get comfortable with the concepts.

The occasional developer playlist

1 Like

Grest! Noted, thanks