It is really time to get off Azure DevOps TFVC source control
A History Lesson
Team Foundation Version Control (TFVC) has been around since 2005, since the first release of Team Foundation Server (TFS) in 2005. In 2013, over 10 years ago, Microsoft added Git support to TFS (later renamed as Azure DevOps), Git had already been around for 8 years at that point.
10 years is a long time in the software industry, I always think of 'IT years' like 'dog years' i.e. 7 to 1, so over 70 years has passed, a lifetime. Over this period Git has become the de facto standard for source control. So if you are still using TFVC as your source control system you really need to ask yourself why?
The advantages of Git over TFVC
The advantages of Git over TFVC are numerous, but here are a few:
- Git is distributed, meaning you can work offline and commit changes locally
- Git has better branching and merging (pull request) support
- Many newer features of Azure DevOps are Git only i.e YAML based pipelines
- Cloud services like Azure Functions, Azure App Service, Azure Logic Apps, Azure API Management etc. all have built-in support for Git
- Git repositories are portable, they are easy to migrate to new systems e.g GitHub, GitLab, Bitbucket etc.
- Any new hires/students will probably have Git experience
From talking to clients who are still on TFVC, the main reason they are still using TFVC is just because they have always used it. There is a fear a change, something you might not expect to see in the technology sector, but all too common.
This fear might be wrappered in the perceived complexity of migrating from TFVC to Git, or that an audit or regulatory requirement means they can't change processes. But these are just excuses. Updates to process and tooling cannot be ignored, you don't have to be the first to move, but the longer you leave it the harder it will be to change.
As an example, one of the most obvious limitations for me of TFVC is how it works with Azure DevOps Pipelines. It is true you have to use the 'classic' pipelines, which are not as flexible as the YAML based pipelines, and have reached a 'done' state and so will get no further development. However, more me the big limitations are not the editor experience but that:
- For each TFVC branch you have to create/clone a new pipeline
- You cannot make CI/CD part of your branch protection
- You cannot source control your pipeline definitions and review them via a PR
These reasons alone should be enough to make you want to move to Git from TFVC.
So how can I migrate?
You have three basic options to migrate from TFVC to Git:
- 'Tip' migration: This is the simplest, you just migrate the latest version of your code to a new Git repository. This is the quickest and easiest, but you lose all the history of your code.
- Azure DevOps Importer: This is a tool that can be used to import a TFVC repository into a new Git repository, with the last 180 days of history. Why you would want neither none of the history or all of the history has always been beyond me!
- Git TFS: A command line extension for Git that can be used to migrate a TFVC repository to a new Git repository, with all the history. A powerful and flexible tool, but it can be complex to use, and is 'brittle' in that it can fail if the TFVC repository has a complex history of branching and renames.
I would always favour the first option. It is the simplest and quickest, and you can always keep the old TFVC repository around for historical purposes. Also remember Git is not TFVC, so what is a good structure in TFVC might not be the best in Git, so you might want to take the opportunity to restructure your codebase.
The other important factor to consider in any migration is that of training. You need to make sure your team is comfortable with Git before you start the migration. This is not just about the commands, but also the concepts of distributed source control, and the different branching and merging strategies that Git enables.
A TFVC to Git migration will be a major change and should be considered as a project in its own right, with planning, training, pilot studies as well as the main migration itself. But remember you don't have to move all your TFVC source control to Git at once, you can do it incrementally, maybe as you start a new version of a product.
Summary
So if you are still using TFVC I urge you to consider migrating to Git. It is not as hard as you might think, and the benefits are numerous.
Happy to discuss this further, please reach out to me via the usual channels