سؤال

So I have pushed my first project to github but the web-inf folder has not pushed. From reading a bit on google it seems that this is due to git.ignore and it is common practice to not push/pull web-inf. However in my project it contains a web.xml that I need to run the project.

So two questions;

Why do people not push/pull web-inf?

if I don't push/pull it how can I work on my project on multiple machines/copies of netbeans?

هل كانت مفيدة؟

المحلول

WEB-INF describes the deployment and is mostly a build and a configuration artefact. It stands to reason to avoid including artefacts with sources, whereby those artefacts can be generally generated or deduced from the sources. This is a common practice.

However git is not a source control system but rather a version control system so storing artefacts is of course possible, but it is best to do so separately. So if you want to store artefacts you should preferably add a separate repository for this.

Generally, you can (1) decide that you do push it to the repo, (2) have a standalone repo, as described above, and push it there, then pulling from both repos on the other machines, (3) recreate it on the other machines as part of your workflow on those machines.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top