Migrating from Source Safe to GitHub

House icon

Published July 04, 2021

Principal Consultant

Magnus Timner

Migrating from Source Safe to GitHub

Some background

When I started working in the 90s Source Safe was the first source control tool I encountered. The first version of Source Safe was released in 1995 and the last one in 2006.

When TFS was release in 2005 I did a lot of migrations from Source Safe, but now days they are not that frequent, still maybe once a year I run in to a customer that still uses Source Safe, so I decided to write a short article to help you migrate.

How to do it

Tip migration

The easiest and the way I recommend doing it is by doing a tip migration, that is, you leave history behind and only migrate the latest version.

This is the way to do it:

First, create a Git repo in GitHub. Make sure you add a .gitignore file that matches your development tool, and readme file as good measure. A gitignore file specifies intentionally untracked files that Git should ignore, like dlls. Next, run the Git Clone command to get a local copy of your nearly empty repository to your disk:

Git clone https://github.com/yourorg/yourrepo.git

  • Get the selected branch from Source Safe to disk.
  • Git works best without binaries, so you should remove them and other unwanted files. It’s quite common for older projects to have their NuGet packages checked in with the code. This is a great opportunity to replace them with feeds to NuGet.org.
  • Copy your files from the Source Safe folder to the cloned Git folder
  • Add your files to Git tracking control, commit them and push all to your remote <BR>

git add <BR>
git commit -m "Added new files from Source Safe" <BR>
git push origin master<BR>

Move with history.

Microsoft has migration tools but they only let you migrate from Source Safe to TFVC (Team Foundation Version control).

If you use that you still must move from TFVC to Git. You can use this nice tool, vss2git to migrate directly.

It hasn’t been updated for some time, but it still does the job. After you migrated to Git you will have to push your code to GitHub.

Connect your local repo to your remote:

git remote add origin https://github.com/yourorg/yourrepo.git

Push your code to your remote and we are ready:

Git push --all origin

Links

Here are links to other migration blogs I have written.

  1. Migrating from Azure Repos to GitHub
  2. Migrating from Team Foundation Version Control to GitHub

Any questions?

Send me a mail at magnus.timner@solidify.se

Solidify and GitHub

Early 2020, we announced the exciting news that we became one of the world's first GitHub Advanced Services and Technology Partners.

GitHub a tool we very much enjoy, and we understand why so many others do, too. If you're interested, take a look at our GitHub page here.

If you are looking for help to migrate from Azure DevOps or any other platform to GitHub take a look at our Go To GitHub Service

If you want to know more about us here at Solidify, take a look at our home page.