Should the whole web directory (httpdocs) be put into the repo?

Quite possibly a very stupid noobie question coming up…

I’m not looking to host on Github just to use it as a repo. The question is should I put the entire web folder into the repo or is it just supposed to be files that are actively being worked on. Thank you in advance.

It depends upon the project. For projects that have some sort of compilation or build routine, like a project that builds an executable, you would typically include the source files, data files, and any scripts for building or packaging the project. For web projects where there isn’t a build process, only HTML and CSS files, then you would typically include everything that you expect to deploy to the web server. Some other web projects have a build process for assets (optimizing image files, minimizing JavaScript and CSS, etc) where you might store the source  and the built assets.

Most of the time, you store what can’t be generated by some other file in the project.

Let us know if you have more questions.


Many thanks indeed for your response lee-dohm that has answered my question.