Source File

A source file is a file which cannot be generated by your build process. So for example main.cpp would typically be a source file. Source files are used as inputs into making the final output - but we also tend to have many what we call “intermediate files” which are produced but are not shipped to the customer.

For instance main.cpp would be compiled into an object file like main.o. This would be linked into a binary like say iguana.exe. But main.o would not be shipped to the customer.

It’s important not to store intermediate files in source control. Why is this?

  • Object file are CPU dependent

  • Object files are not human readable - so tracking changes is not useful

  • Small changes to the source file would likely impact many lines of the object file which makes it inefficient and very noisy

  • The amount of changes would be overwhelming

  • It would take up a lot of extra disc and network resources.