Az400 v6 - HOW TO migrate TFVC to GIT with FULL HISTORY | git-tfs Microsoft Certification AZ400

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to this video on migrating from Team Foundation version controls again we've been talking a lot about gates having seen the advantages should you make up your minds and move ahead from team foundation version control to gate then this video should help you plan for that migration the two kinds of migration that can be done with discuss both the migrations and weigh the pros and cons of both approach then we look at a demo of how to actually do the migration now there are two types of migration the first type is called as migrating the tip as the name indicates you're not carrying forward any history from your team foundation version control repository you're simply taking the last version of the code and setting that up in gate the second option is to take the entire history across from Team Foundation version control ins again mm-hmm is that the right thing to do I would question it the reason I say that is both team foundation version control and gates are fundamentally different team foundation version controls stores branches as individual folders you know changes are our stories chain sets whereas kid works in a completely different way so you're relying on the migration to kind of transform the history from that mechanism across into a mechanism that gate understands now the tool will do a good job at it it might not do the perfect job therefore having learned from hands-on experience in the fields if you have an option of only migrating the tip then that to me would feel like the right thing to do in addition to that you know I would also mention that this is a new opportunity you know if you're moving across from Team Foundation version control into gate to fully leverage all the benefits that get offers it might make sense to restructure your codebase you know rather than having a monolithic application how about breaking it down into smaller modules and breaking them out into separate git repositories and that becomes very hard to do if you try and take the history along with that migration so you know the two options that are available are doing with history doing without history so what we will do is in the first we'll cover how the product allows you to do the migration with the history the limitation here within the product is that when you do the migration you're only allowed to carry forward hundred and eighty days worth of history so if you plan to carry more history across than that then we'll have to look at the second demo which is to use the command line for an open source tool to carry all of the history or selectively carry one branch over the other okay so let's get right into the demo so let's start off by opening up PowerShell and installing a utility called git TFS now git TFS is an open source utility that you can read up more about on github but it basically provides you a two-way bridge that can help you take changes from TFS bring them in git and take changes from git and push them back into TFS so we're going to run a command to look at a list of all the TF VC based code repositories that are available within our as your DevOps instance and as I run this command you can see that in my a short DevOps organization I still have a few projects that are using Team Foundation version control this one the team rooms is an extension that I wrote with a colleague would crush a few years back and we chose to use Team Foundation version control back then now you can see that this is quite an old repository it's got a few branches in it as well it seems like a good candidate to do the migration so let's get into it navigate back into Azure DevOps search for the team rooms project open up the project and looking at the history you can see that the changes go back to 2015 so we haven't been actively developing this extension now as you can see that there are a few branches here I can see there's a source branch and then for releases there are several of the branches so what I'm gonna do here is I'm going to migrate the source branch across into git now the in product experience that I talked about is natively available within as your repos where you can come in and say import repository and it gives you an option to select the type of repository you want to import if I select here we see here I can optionally specify the path to the branch that I want to migrate across and by selecting the migrate history option I can select the duration of the history that I want to pull it across now in this case as we've seen we haven't made any changes since 2015 so there's not going to be much history that we'll come across as we migrate the source branch so I'm going to leave it at 30 days let's call this teams team rooms dart kids the import process has kicked off great since there wasn't much history to be ported across the import process completes fairly quickly let's navigate in to the git repo that's been created and we can see that there's one history item that's been ported across but all of the source branch contents have been moved across into into a git repo excellent right now this was a fairly simple use case where you know we opted not to carry the history across but should we decide to take the history across and all of it maybe then we have to look at the command line to do it as the interface doesn't allow for porting more than hundred and eighty days worth of history so let's go back into our power shell PowerShell nor Azure PowerShell just the native PowerShell and so we've created ourselves a new folder called team rooms one and we're going to use git TFS open-source utility to download the code from TF VC and migrate the code across into gate in order to do that we'll have to run the following command so let's look at what this command is doing it's triggering the get TFS workflow to clone the team room source branch in the azure devops geeks instance if i run this command considering it has to port the history across and all of it this will take a good amount of time so I'm going to let this run for a little bit and then come back and show you what operations are happening within the folder so it's been working away for a while now and you can see that it's starting to go through the individual historic commits that are available in the source branch and convert them into gate hashes let's navigate into the directory and see what's happening as we go into the source folder we see that there is a dot git folder created and then within that a subfolder W if you open this W folder you can see that it's basically creating an extract of the entire history one change at a time and then converting that history into the equivalent of git so this is going to take a bit of time to complete rather than wait for it let me show you one that I've already prepared okay so we're going to cancel this operation and look at an repository that I've already imported this repository I have let's navigate into it okay let's look at the history now as you can see here rather than have just a couple of changes it has the full-fledged history and you can see that although it's done the export from the source branch it's able to find the association's to the other related branches and draw that history out and presented in a graphical way so we know some of the changes that are available in the source branch where which are the branches did they originate from so um you know with that let's look at the structure so this is what the exported pot looks like with full history if you're generally happy with these changes you could follow the workflow to add a new remote with that command you can then push the changes back onto the server so in this video here we talked a little bit about the options when looking to migrate from TF easy to get the two options being tip migration and migration with full history agile repos natively supports tfv c to get migrations with the limitation of 180 days worth of history being exported the other option is to use the command line tool get TFS which empowers you to go native and kind of explore the options of doing branch based exports with full history [Music] you
Info
Channel: Azure DevOps TV
Views: 5,439
Rating: undefined out of 5
Keywords:
Id: bciIcoJY7F8
Channel Id: undefined
Length: 10min 58sec (658 seconds)
Published: Wed Mar 25 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.