Migrating TFVC to Git While Preserving Every Branch's History
Your team is migrating from TFVC to Git in Azure Repos. They want to preserve the history of all branches. Which migration tool should you use?
Quick Answer
git-tfs is purpose-built for TFVC-to-Git migrations that need to preserve full history — it converts TFVC changesets into Git commits and maps TFVC branches onto Git branches, carrying over branch relationships and merge history rather than flattening everything into a single import.
⚠ Common exam trap
Many candidates confuse git-tfs with git-svn, assuming both are interchangeable for any centralized-to-distributed migration, but git-tfs is TFVC-specific while git-svn is for Subversion, and Azure DevOps Migration Tools are for organizational data migration, not source control conversion.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
git-tfs tool
The git-tfs tool is specifically designed to migrate TFVC repositories to Git while preserving full branch history, including changesets, branch relationships, and merge history. It bridges the gap between TFVC and Git by converting TFVC changesets into Git commits and mapping TFVC branches to Git branches, making it the correct choice for this migration scenario.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GitHub Importer
Why it's wrong here
For importing to GitHub.
- ✗
Azure DevOps Migration Tools
Why it's wrong here
Migrates work items, not repo history.
- ✓
git-tfs tool
Why this is correct
Preserves history and branches.
- ✗
git-svn
Why it's wrong here
For Subversion, not TFVC.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
Key term
Git
Git is a version control system that tracks changes to files so multiple people can work on the same project without overwriting each other's work.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on AZ-400
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A team is migrating from TFVC to Git. They have a large codebase with many branches. What is the recommended approach to preserve the history during migration?
medium- A.Copy the latest version of the code to a new Git repository and start fresh
- B.Use the Git-TF tool to clone the TFVC repository
- ✓ C.Use the git-tfs tool to clone the TFVC repository with changesets
- D.Export TFVC as a Git bundle and import with --no-metadata
Why C: Git-tfs is a specialized bridge tool that converts TFVC changesets into Git commits, preserving the full history, author information, and branch structure during migration. Unlike Git-TF, which is deprecated and lacks support for newer TFVC features, git-tfs handles complex scenarios like merges and shelvesets, making it the recommended approach for preserving history when moving from TFVC to Git.
Variation 2. A team is migrating from TFVC to Git in Azure Repos. They have a large repository with a history of 10,000+ commits. They want to preserve the full history while minimizing migration time. Which approach should they recommend?
medium- ✓ A.Use git-tfs to clone the TFVC repository with full history, then push to Azure Repos.
- B.Check out the latest version from TFVC, initialize a new Git repo, and push.
- C.Use the Azure Repos import repository feature to import from TFVC.
- D.Clone the TFVC repository using Git and push to Azure Repos.
Why A: Git-tfs is a specialized bridge tool that can clone a TFVC repository with full history into a local Git repository, preserving all commits, branches, and metadata. This approach minimizes migration time by performing the conversion locally without network overhead, after which the Git repo can be pushed to Azure Repos. Other methods either lose history or are not supported for TFVC-to-Git migration.
Variation 3. Your team is migrating from TFVC to Git in Azure Repos. Which TWO actions should you take to ensure a smooth migration?
medium- A.Use the Azure DevOps Migration Tool to directly map TFVC permissions to Git repository permissions.
- ✓ B.Use the git-tfs tool to clone the TFVC repository with full history into a local Git repository.
- C.Create a single Git repository with multiple branches that mirror the TFVC branch structure.
- ✓ D.Train the development team on Git branching strategies and commands before the migration.
- E.Enable Git LFS in the new repository to handle large binary files from TFVC.
Why B: The git-tfs tool is specifically designed to bridge TFVC and Git, allowing you to clone a TFVC repository with full changeset history into a local Git repository. This preserves the commit history, which is critical for audit trails and code review continuity during the migration. Additionally, training the development team on Git branching strategies and commands is essential to ensure the team can work effectively with the new version control system and minimize disruption during the transition.
Variation 4. Your team is migrating from TFVC to Git in Azure Repos. You need to preserve the full history of the TFVC repository, including all branches and changesets. The TFVC repository is large (over 10 GB). Which tool should you use to perform the migration?
easy- A.Manually recreate the commits in a new Git repository.
- ✓ B.Use git-tfs to clone the TFVC repository and then push to Azure Repos.
- C.Use git-svn to convert TFVC to Git.
- D.Use the Azure DevOps Migration Tools to export TFVC to Git.
Why B: B is correct because git-tfs is specifically designed to bridge TFVC and Git, allowing you to clone a TFVC repository (including all branches, changesets, and history) into a local Git repository, which can then be pushed to Azure Repos. It handles large repositories (over 10 GB) by performing an incremental clone, preserving the full history without manual recreation.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.