Do files ignored in '.gitignore' not run at all?

I want to make a project in React.js, that uses images that would only run when the device orientation is a specific one. In short, this is Media Queries of CSS.

But now if I were to edit the .gitignore file as to ignore the Media Query Images, then will the images be blocked and couldn’t be run at all?

No, editing the .gitignore file to ignore the Media Query Images will only affect version control and Git repository management. It will not affect the functionality of your React.js project.

However, if your project depends on these images and they are not included in your source code or build process, they will not be available for your users. So, if you want your project to use Media Query Images, you should make sure they are included in your project’s source code or build process, even if they are ignored by Git.

You can also consider hosting these images on a third-party service or a Content Delivery Network (CDN) and reference them in your code or build process, rather than including them directly in your project. This can help to reduce the size of your project and improve its performance.

So do images in the src folder count as source code?

No, images in the “src” folder are not technically considered source code, they are still an important part of a web project and should be included in the project’s version control system along with the source code files.

Thanks for the solution!