Answer the question
In order to leave comments, you need to log in
How to add directories to Git?
I need to create one repository with three subfolders. The architecture of the project is something like this:
wa-data/public/shop/themes/my-theme/ - theme for the shop application
wa-data/public/blog/themes/my-theme/ - theme for the blog application
wa-data/public/site /themes/my-theme/ - theme for the site application
Themes themselves can inherit each other, for example, the main one here: site, a single index.html file is stored there, which is inherited by other applications (described in the theme's XML manifest file), thus The blog uses the index.html file from the site application folder.
If I now do a git init in the wa-data/public/ folder, then a whole bunch of files will get there, for example wa-data/public/shop/products/* where there are product photos.
Moreover, in the themes folders there are other folders (themes) that should not be included in the repository, since they are not currently used.
Something I don’t understand is how to properly organize the repository so that only the files I need get there, and so that when I do a git clone on production, nothing falls off.
So can be done?
git init
git add wa-data/public/shop/themes/my-theme/*
git add wa-data/public/site/themes/my-theme/*
git add wa-data/public/blog/themes/my-theme/*
Answer the question
In order to leave comments, you need to log in
It's simple, you need to use gitignore webnotes.by/docs/raznoe/pravila-sintaksisa-fayla-g...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question