What are the differences between Subversion and Git?

Each reference, or labeled snapshot of a commit, in a project is organized within specific subdirectories, such as trunk, branches, and tags. For example, an SVN project with two features under development might look like this:

The trunk directory represents the latest stable release of a project.

Active feature work is developed within subdirectories under branches.

When a feature is finished, the feature directory is merged into trunk and removed.

Git projects are also stored within a single directory. However, Git obscures the details of its references by storing them in a special .git directory. For example, a Git project with two features under development might look like this:

A subproject is a project that's developed and managed somewhere outside of your main project. You typically import a subproject to add some functionality to your project without needing to maintain the code yourself. Whenever the subproject is updated, you can synchronize it with your project to ensure that everything is up-to-date.

In SVN, a subproject is called an SVN external. In Git, it's called a Git submodule. Although conceptually similar, Git submodules are not kept up-to-date automatically; you must explicitly ask for a new version to be brought into your project.

Here are some external resources that explain the differences in more detail: