What does not belong to the source control
repository?
Let's look into what should not be checked into the source control repository.
Firstly, anything other than the source code file shouldn't be checked in. The computer
generated files should not be checked into source control. For example, let's assume
that we have a Python source file named main.py. If we compile it, the generated code
does not belong to the repository. The compiled code is a derived file and should not be
checked into source control. There are three reasons for this, outlined as follows:
• The derived file can be generated by any member of the team once we have the
source code.
• In many cases, the compiled code is much larger than the source code, and adding
it to the repository will make it slow and sluggish. Also, remember that if there are
16 members in the team, then all of them unnecessarily get a copy of that generated
file, which will unnecessarily slow down the whole system.
• Source control systems are designed to store the delta or the changes you have made
to the source files since your last commit. Files other than the source code files are
usually binary files. The source control system is most likely unable to have a diff
tool for that, and it will need to store the whole file each time it is committed. It will
have a negative effect on the performance of the source control framework.