Sourcetree For Svn

  1. Open Sourcetree and clone the SVN repo into the REPO1 folder you created above. Clone it as if it was a Git repo, but enter the URL of the SVN repo. You will probably need to enter your user name and password for the SVN account here. Sourcetree will notice that it’s an SVN repo and ask you for some details on how to convert it.
  2. Sourcetree for mac是 Windows 和Mac OS X 下免费的SVN、Git 客户端,同时也是Mercurial和Subversion版本控制系统工具。Sourcetree for mac支持创建、克隆、提交、push、pull 和合并等操作。SourceTree拥有一个精美简洁的界面,大大简化了开发者与代码库之间的Git操作方式,这对于那些不熟悉Git命令的开发者来说非常实用。.

SourceTree is ranked 9th while Visual Studio is ranked 14th. The most important reason people chose SourceTree is: In addition to color-coded branches and icons that tell if a file has been added, removed or modified, SourceTree also displays the number of commits that are ahead and behind the remote branch. Eclipse Subversive - Subversion (SVN) Team Provider. The Subversive project is aimed to integrate the Subversion (SVN) version control system with the Eclipse platform. Using the Subversive plug-in, you can work with projects stored in Subversion repositories directly from the Eclipse workbench in a way similar to work with other Eclipse version control providers, such as CVS and Git. Sourcetree 使用 SourceTree 管理SVN 代码仓库. 众所周知 SourceTree 是一款十分方便的Git 管理工具,当然,也可以使用他来管理 SVN 托管的代码。. 使用 SourceTree 来管理 SVN 的代码仓库,不能像 Git 仓库那样直接从 URL 来 Clone,应该先通过指令在本地创建SVN- Git 仓库,然后,将该仓库添加到 SourceTree 中进行管理;.

The next step in the migration from SVN to Git is to import the contents of the SVN repository into a new Git repository. We’ll do this with the git svn utility that is included with most Git distributions, then we’ll clean up the results with svn-migration-scripts.jar.

Sourcetree For Svn

Beware that the conversion process can take a significant amount of time for larger repositories, even when cloning from a local SVN repository. As a benchmark, converting a 400MB repository with 33,000 commits on master took around 12 hours to complete. Small bathroom storage cabinet over toilet.

For reasonably sized repositories, the following steps should be run on the migration lead’s local computer. However, if you have a very large SVN repository and want to cut down on the conversion time, you can run git svn clone on the SVN server instead of on the migration lead’s local machine. This will avoid the overhead of cloning via a network connection.

Clone the SVN repository

The git svn clone command transforms the trunk, branches, and tags in your SVN repository into a new Git repository. Depending on the structure of your SVN repo, the command needs to be configured differently.

Standard SVN layouts

If your SVN project uses the standard /trunk, /branches, and /tags directory layout, you can use the --stdlayout option instead of manually specifying the repository’s structure. Run the following command in the ~/GitMigration directory:

Where is the URI of the SVN repository that you want to migrate and, is the name of the project that you want to import, and is the directory name of the new Git repository.

Sourcetree For Svn

For example, if you were migrating a project called Confluence, hosted on, you might run the following:

Non-standard SVN layouts

If your SVN repository doesn’t have a standard layout, you need to provide the locations of your trunk, branches, and tags using the --trunk, --branches, and --tags command line options. For example, if you have branches stored in both the /branches directory and the /bugfixes directories, you would use the following command:

Inspect the new Git repository

After git svn clone has finished (this might take a while), you’ll find a new directory called <git-repo-name> in ~/GitMigration. This is the converted Git repository. You should be able to switch into <git-repo-name> and run any of the standard Git commands to explore your project.

Sourcetree For Svn

Branches and tags are not imported into the new Git repository as you might expect. You won’t find any of your SVN branches in the git branch output, nor will you find any of your SVN tags in the git tag output. But, if you run git branch -r, you’ll find all of the branches and tags from your SVN repository. The git svn clone command imports your SVN branches as remote branches and imports your SVN tags as remote branches prefixed with tags/.

This behavior makes certain two-way synchronization procedures easier, but it can be very confusing when trying to make a one-way migration Git. That’s why our next step will be to convert these remote branches to local branches and actual Git tags.

Clean the new Git repository

The clean-git script included in svn-migration-scripts.jar turns the SVN branches into local Git branches and the SVN tags into full-fledged Git tags. Note that this is a destructive operation, and you will not be able to move commits from the Git repository back into the SVN repository.

If you’re following this migration guide, this isn’t a problem, as it advocates a one-way sync from SVN to Git (the Git repository is considered read-only until after the Migrate step). However, if you’re planning on committing to the Git repository and the SVN repository during the migration process, you should not perform the following commands. This is an advanced task, as is not recommended for the typical project.

To see what can be cleaned up, run the following command in ~/GitMigration/:

This will output all of the changes the script wants to make, but it won’t actually make any of them. To execute these changes, you need to use the --force option, like so:

You should now see all of your SVN branches in the git branch output, along with your SVN tags in the git tag output. This means that you’ve successfully converted your SVN project to a Git repository.



In this step, you turned an SVN repository into a new Git repository with the git svn clone command, then cleaned up the structure of the resulting repository with svn-migration-scripts.jar. In the next step, you’ll learn how to keep this new Git repo in sync with any new commits to the SVN repository. This will be a similar process to the conversion, but there are some important workflow considerations during this transition period.

Sourcetree Svn Mac

Next up:


Start next tutorial