How to use github with complex directory structure

On my drive I have the following structure:

~webProjects/
    skipper/
        include/
        public/
        views/
    index.php

how do I set up my git repo so I have 1 repo for all these files and folders under webProjects.

In the above example skipper is the root folder for the skipper project. I’m trying to create 1 repo for skipper and it’s dependencies

It’s a bit unclear what you want here, to you do you want ~webProjects/ or skipper/ to be the root of your repository?

Either way, you don’t need to do anything special for the folder structure, just git add the files in those directories. Keep in mind that git does not track empty directories, only files and implicitly their parent directories. In some situations people add empty files (often .gitkeep or .keep) to empty directories so they appear on checkout, but usually it’s better to let the build process of your software create directories if needed.

thanks. My idea was to have a single place where I keep all my webProjects but then have a repo for each project. So in this case skipper would be my root. Anyway, thanks I understand how to have the folders included.

1 Like