What should be in version control… and what should not.

There’s clear line between these two and one should never cross that line without very good reason.

Heikki Hellgren
3 min readSep 27, 2018

--

Version control systems, such as git and SVN, are very popular around the globe and used in most projects. Version control systems allow saving individual changes to files, diffing those changes and ultimately rolling back the work to specific revision. But version control systems should not to be used to store all data your project needs.

So what you should put in version control system? At least:

  • Source code files
  • Scripts and other files you need to build software
  • Text formatted documentation, such as README and LICENSE files
  • Tool configuration files, such as clang-format settings and .gitignore
  • All other text files that your project needs

Baseline for files in version control is that they are hand written text. So what should not be put in the version control and why?

  • Generated files. Each person working with the repository should be able to generate these files with a push of a button — it’s not good idea to put them in version control as they only mess up your history once the…

--

--

Heikki Hellgren

Father of two, husband and Lead Developer @ OP Financial Group. I write about things I like and things I don’t. More info @ https://drodil.kapsi.fi