-2

We are planning to move code repositories from TFS to Git. We wanted to move history along with the current snapshot, but considering the complexity, size and other limitations (Microsoft itself suggests to go with tip migration only), we are planning to keep history in TFS server only. We will allow the developer to get back to TFS server if they want to see the history.

But we are wondering if we would save any licensing cost in doing so as TFS server will be required for auditing and history purpose. And we will have to give developer license so that they can access TFS server to view the history (as and when required).

Any suggestions?

Pragmatic
  • 3,093
  • 4
  • 33
  • 62
  • Do you want to migrate TFVC repo to git repo by keeping histories? And where do you want to hosted the git repo, still in your Team Foundation Server? – Marina Liu May 07 '18 at 09:08
  • @Marina, We want to start using git in place of TFVC. We would like to use Bitbucket for that. Since migrating history is not straightforward, we want to keep them in TFVS. https://learn.microsoft.com/en-us/azure/devops/git/centralized-to-git – Pragmatic May 07 '18 at 09:30
  • I added an answer for migrate TFVC repo to git repo without histories, you can have a try. Besides, for checking the histories of TFVC repo, users need to have permission to access the TFVC repo. – Marina Liu May 07 '18 at 09:54

1 Answers1

0

To migrate TFVC repo from TFS to bitbucket git repo without keeping histories, you can follow below steps:

1. Create a git repo in your bitbucket account

In your bitbucket, you need to create a git repo first.

2. Create a local git repo and commit the changes

In the TFVC workspace (if there is no workspace in your machine, then create one), create a local git repo as below:

# In the workspace directory
# Delete $tf folder
git add .
git commit -m 'add files from TFVC repo to git repo'

3. Push changes from local git repo to bitbucket

Copy the bitbucket repo URL (such as https://account@bitbucket.org/username/reponame.git), then add it as a remote for the local git repo and push to the remote:

git remote add origin https://account@bitbucket.org/username/reponame.git
git push -u origin master

Now files are pushed to bitbucket repo without keeping the histories.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74