1.2 What Should You Store?

The short answer: everything.

The slightly less short answer: everything that you need to work on your project. Your repository needs a copy of everything in your project that’s essential for you to modify, enhance, and build new versions of it.

The first and most obvious thing you should store in the repository is your project’s source code. Without that, you can’t fix bugs or implement new features.

Most projects have some sort of build files. A couple of common ones are Makefiles, Rakefiles, or Ant’s build.xml. These need to be stored so you can compile your source code into something usable.

Other common items to store in your repository are sample configuration files, documentation, images that are used ...

Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.