I'm trying to convert a Visual SourceSafe Repository to Git while keeping the exact version history. So I've tried using https://github.com/trevorr/vss2git. It worked, but it didn't keep the history. So I tried using TFS as a middleman. I used The latest version of TFS and its upgrade wizard but it didn't keep the history, so I tried with TFS 2013 (How to migrate VSS 2005 to TFS 2015?) and its upgrade wizard, but still no history. I'm pretty desperate now, and I don't know where the problem lies, as I even analyzed my VSS repository, and no errors were found. I've read that I could also try using SVN as the middleman, so I'll do that, but I'm skeptic.
Here is the solution which worked for me a couple years ago. When I tried the mentioned vss2git, it has blown our 9GB vss database in 103GB over a weekend without reaching the end.
So I took the TFS server (2010) as middleman and it worked. The TFS 2010 could import VSS database directly, I am not sure about newer ones. Simultaneously, the TFS can serve as a git remote using git-tf, or git-tfs for example. After the import, simple git tfs clone
has done the second part of the business. So here you go:
- Get a TFS version capable of VSS import. This link can help you.
- Use the wizard, or command line to import your VSS database.
- Get git-tfs from here
- (Optionally) fix the commit dates - see below.
- Do something like this
git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project
The only quirk I can remember was that the TFS has set the date of all commits to current date and has put the original vss dates into the comments. I have fixed this directly in the SQLEXPRESS database of the TFS like this:
UPDATE tbl_ChangeSet
SET CreationDate = CONVERT (datetime, Substring(Comment,2,19), 104)
Where CreationDate > '2014-01-28' AND Comment LIKE '{%'
Please put your own date (of the last VSS comit) into the query.
You can try https://github.com/azarkevich/VssSvnConverter, but it is not user friendly. (Despite it`s name it can convert VSS to Git)
Also this tool does not keep history of file/directory moves/renames. File will have history with latest name.
I've found the solution, and the programs I used do work. It's just that I tried to move too much data, so it would just glitch and not store the history. I'm not sure exactly the amount of data I can safely move, but I now have a history
© 2022 - 2024 — McMap. All rights reserved.