AZ-400: Designing and Implementing Microsoft DevOps Solutions

Work with Azure Repos and GitHub

Transitioning from TFVC to Git

Migrating from Team Foundation Version Control (TFVC) to Git can unlock modern workflows, distributed collaboration, and more flexible branching strategies. In this guide, we’ll walk through a branch-by-branch import, compare migration scopes, and highlight the top benefits of moving your codebase to Git.

Branch-Level Migration

A phased, branch-level approach lets you validate each import before proceeding, minimizing risk:

  1. Select a single TFVC branch to import.
  2. Use the Azure DevOps Git import feature or a tool like Git-TFS.
# Example: Import a TFVC branch into a new Git repo via Git-TFS
git tfs clone https://tfs-server:8080/tfs/DefaultCollection $/Project/Main --branches=all

Note

Start with a non-critical branch (e.g., development) to verify the process before importing protected or release branches.

The image illustrates the process of transitioning from TFVC to Git, highlighting branch-level migration and showing an interface for importing a repository from TFVC.

Once the import is successful, repeat for each remaining branch until your entire TFVC repository resides in Git.

Migration Scopes: Tip vs. Full History

Choose the right migration scope based on your needs:

StrategyDescriptionWhen to Use
Tip MigrationOnly the latest revision (“tip”) is moved to Git.Rapid cutover with minimal setup
Full History MigrationEvery TFVC changeset is converted into a Git commit, preserving complete history.Full audit trail and compliance needs

Warning

A full-history migration can take significantly longer and may require careful mapping of authors and commit dates. Plan for additional time and storage.

  • Tip Migration: Keeps TFVC history archived on the original server for quick switch-over.
  • Full History: Ensures end-to-end traceability by importing all historical changesets.

Benefits of Moving to Git

Adopting Git from TFVC delivers several improvements in workflow and performance:

FeatureTFVC ModelGit Model
History TrackingChangesets stored centrallyFilesystem snapshots, enabling flexible diffs
BranchingBranches as foldersLightweight pointers, quick create/delete
CollaborationCentralized checkout/lock modelDistributed clones for offline work

The image outlines advantages of transitioning from TFVC to Git, highlighting streamlined migration and differences in branching methods.

  • Distributed Workflow: Team members can work independently and sync changes asynchronously.
  • Rich Ecosystem: Leverage integrations with CI/CD pipelines, code review tools, and platform-agnostic hosting.

Watch Video

Watch video content

Previous
Creating repository in Azure Repos