Version control systems are used in most development projects. Version control systems allow programmers to save individual changes to files while enabling them to roll back the work to specific revisions. But, programmers tend to put everything in there. So, what should you put in the version control system? In the article at DZone, Simon Foster provides guidelines to help you determine what goes in.
What Should Be in Version Control?
Anything that you add to a project during its life is data. If you have an upload option, anything that is uploaded would be described as data.
Classify icons or images attached to the functionality of the project as source code. You cannot open these files with your text editor or read them. Therefore, you must have some images in the repository while developing an app or webpage. However, you must always think twice before pushing them.
Besides the points mentioned above, you can also include:
- Scripts and other files you need to build software
- Texted formatted documentation, such as LICENSE and README files
- All text files your project demands
- Tool configuration files that include clang-format settings and .gitignore
If you are hosting on a cloud computing platform like Azure, it provides you with an easy way to identify the difference between code and data.
- Anything in your storage is data
- Anything in your web app is the code
- Anything that has to do with SQL is both code and the data
To read the original article, click on https://dzone.com/articles/what-should-be-in-source-control.