Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I follow a principle of only including in version control source code. If I can reliably generate the same output from the same input from that source code then there is no need to also store the f...
Answer
#1: Initial revision
I follow a principle of only including in version control *source code*. If I can reliably generate the same output from the same input from that source code then there is no need to also store the final build artifacts themselves. As long as your are also storing your build configuration in source control alongside your SASS files, you should be able to reliably regenerate the CSS from any point in your project's history. The reason I follow this approach is because it forces me to ensure that the source can be reliably built by others and isn't accidentally dependent on a local dependency anywhere. This is important in OSS but also in private repositories where there is some collaboration with other users. If my build toolchain has to build this from scratch, I've got at least some validation that others can do the same. Another advantage is that this approach keeps my repository as **simple and lightweight** as possible but this is more relevant when dealing with large outputs and less a problem in the case of CSS. If you do store your build output in source control, it may make deployment **much faster** since the implication is that you have already performed your build locally. If you do do this, like @r~~ recommends in their answer, you should consider automating your build step to always build before publishing changes to ensure the source and output are never out of sync.