Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to convert a git repository to a tfvc repository?


Asked by Caiden Beasley on Dec 10, 2021 Git



After setup, the next step is to run Git-Tfs to download the TFVC repository into a local Git repository. The conversion is done by Git-Tfs, which creates a new Git repository with the migrated code, you will then proceed to push that Git repository to the new remote Git repository you create in TFVC.
Subsequently,
To migrate Git repo to TFVC repo, you need to install git-tftool at first. And also make sure you have added a TFVC repo before migration. And assume the TFVC repo name is projectname. After installing git-tf successful, then use below commands to checkin the files and histories in TFS TFVC repo:
In fact, First of all we create a new, empty Git repository on our TFS server, of course within the same Team Project. Therefore open the “Code” tab of your Team Project in the browser and click “New repository”. Then specify a name for the repository and click “Create”. Don´t add a README and don’t add the .gitignore file at this point.
In addition,
When you officially switch to Git, then people shouldn’t be able to commit changes to the old TFVC repository anymore. They should only commit to the new Git repo. Now you have a new Git repo and from a technical point of view you are ready to switch to Git.
One may also ask,
Select Repos, Files. From the repo drop-down, select Import repository. If the source repo is publicly available, just enter the clone URL of the source repository and a name for your new Git repository.