---

Git Behind the Curtain: What Happens When You Commit, Branch, and Merge

I think that the first thing to understand about Git is that it’s not strictly a source control system; it’s more like a versioned filesystem that happens to be good at source control. Traditionally, source control systems focused on the evolution of files. For example, RCS (and its successor CVS) maintain a separate file in the repository for each source file. These repository files hold the entire history of the file as a sequence of diffs that allow the tool to reconstruct any version. Subversion applies the idea of diffs to the entire repository, allowing it to track files as they move between directories.