If you generate CSS from SASS, then you do not need to version CSS at all, because in this case it is an assembly artifact , and not the source code . This is similar to including a compiled program in the repository with each commit. Or in the recipe book pour borscht and chops. The disadvantages are:
- The extra data increases the size of the repository.
- Changes are visible at once in two places - in the source and in artifacts. In this case, the artifacts, no one hands changed.
- It is not obvious where to make changes - in CSS or SASS.
Most likely, the css folder is added to the .gitignore file .gitignore that git does not track it. This is no accident (see previous paragraph).
Fixed the file and everything went
In vain, correct back.
You obviously need to deliver CSS to the server during the deployment process. It looks like you are trying to deploy via git - for this you have to add CSS to git. Do not do so, this is an inefficient and unsafe approach. Instead, deliver the generated site files using rsync .
Building CSS from SASS using gulp is generally possible and necessary to automate. You can start with the finalization of the gulp task - add one more for publishing via rsync and you don’t have to do it by hand. Instead, you will write something like
gulp build # тут проверили локально, что всё хорошо gulp publish # тут работает rsync
Full automation can be done using a continuous integration server connected to the repository. If you have a project on GitHub, then you can connect Travis CI and build on it. It is free for open source. Here is an example config for building a project on Node.js using Travis CI: JavaScript (with Node.js)
About the difference between sources and artifacts, Etki spoke quite well .