Skip to main content

Team Foundation Server: How to migrate TFS Version Control project by project

One of the customers I work for is making the move to Team Foundation Server. For the project I’m working on, we used a temporal TFS project hosted at my employer(Ordina). Unfortunately there wasn’t an easy migration path to move the source code from the Ordina TFS to the TFS at the customer location. Why? Because we are using SQL Server 2014 and the customer has standardized on SQL Server 2012. And this is an unsupported migration path.

Luckily, I found a workaround to not lose any history. In short, what I do is export all the source code in TFS Version Control(TFVC) from my company’s TFS to a Git Repo. Afterwards I import the code from Git  into the TFSVC from the customer.

Interested in the specific steps? Here are all the details:

Prerequisites

I used a combination of 2 tools that support integration between TFS and Git. (Why 2 tools? Because I had some issues when I tried to accomplish the process with only one of the tools.)

Export the code from TFSVC into Git using Git-TFS

  • Download and install the Git-TFS binary
  • Add the git-tfs folder path to your PATH environment variable
  • Open a command prompt
  • Check which branches are available for cloning
  • Clone the full repository or a specific branch(note that this can take a while…)
  • After the clone operation has completed, you have the full TFS history available in a local git repo

Import the code from Git into TFSVC using Git-TF

  • Let’s now switch to the Git-TF tool. Download and install it from the Microsoft Download site.
  • Add the Git-TF installation path to your PATH environment variable
  • Open a command prompt
  • Browse to the location where you have the local git repo created
  • Configure git-tf to link to the target tfs repo
  • Do a check-in of the Git repo in TFS
    • git-tf checkin --deep --verbose

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Col...