1.5 Tracking Projects, Directories, and Files

So far you’ve seen how to store your code in repositories. In this section, we’ll talk about how to organize the things you store.

At the lowest level, Git tracks the files you store in your repository as content. This is different from many version control systems that track files. Instead of tracking a models.py file, Git tracks the content—the individual characters and lines that make up the variables, functions, and so on—of models.py, and Git adds metadata to it such as the name, file mode, and whether the file is a symlink. It’s a nuanced difference, but it’s an important one.

Technically, this has a lot of advantages. It reduces the amount of storage space needed to store the entire history ...

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.