Skip to main content

Subversion과 Git 간의 차이점은 무엇인가요?

SVN(Subversion) 리포지토리는 Git 리포지토리와 비슷하지만 프로젝트의 아키텍처와 관련하여 몇 가지 차이점이 있습니다.

Directory structure

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:


An SVN workflow looks 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 Git workflow looks like this:

  • A Git repository stores the full history of all of its branches and tags within the .git directory.
  • The latest stable release is contained within the default branch.
  • Active feature work is developed in separate branches.
  • When a feature is finished, the feature branch is merged into the default branch and deleted.

Unlike SVN, with Git the directory structure remains the same, but the contents of the files change based on your branch.

Including subprojects

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.

For more information, see "Git Tools Submodules" in the Git documentation.

Preserving history

SVN is configured to assume that the history of a project never changes. Git allows you to modify previous commits and changes using tools like git rebase.

GitHub supports Subversion clients, which may produce some unexpected results if you're using both Git and SVN on the same project. If you've manipulated Git's commit history, those same commits will always remain within SVN's history. If you accidentally committed some sensitive data, we have an article that will help you remove it from Git's history.

Note: Subversion support will be removed from GitHub on January 8, 2024. A future release of GitHub Enterprise Server after January 8, 2024 will also remove Subversion support. To read more about this, see the GitHub blog.

Further reading