How to clone a VSTS project/workspace locally? - tfs

We have a project/workspace setup in Visual Studio Team Services online. I would like to get a local backup of the workspace and project with all of its artifacts (attachments, Wiki notes and attachments, etc.).
Would a local version of TFS pointed to VSTS online clone the epics, features and stories locally? This is what I really need.
What is the process to accomplish this?

You can not clone the whole contents of a team project, but clone the source code from version control system (Git or TFVC) is possible.
If you are using Git as VCS, you can use below command to clone the VSTS git repo:
git clone <repo URL>
And you can also refer the document to clone a VSTS git repo via VS.
If you are using TFVC as VCS, you can map TFVC repo locally in VS. Detail steps you can refer Develop and share your code in TFVC using Visual Studio.
Seems you also want to migrate WIT from TFS to VSTS. You can refer these related posts: Migrate Workitems from local TFS into VSTS and Migrating Work Items from TFS 2017 to VSTS.
Besides, you can also refer the document Migrate data from TFS to VSTS.

Related

Clone GIT to TFS (AzureDevOps) with git-tfs

we have an local DevOps Server 2019 with our old projects and I am able to clone this projects with git-tfs to local Git repositories. Everything is fine. After that I can push this repositories to our AzureDevOps Git repositories. Everything ok.
Now we have some projects and colleagues who want to use TFVC for these special projects. So my idea was to clone these projects from local TFS to Git and then use git-tfs rcheckin to push it to our AzureDevOps project.
But when I use "git-fts rcheckin --remote azuretfs" I get "error: latest TFS commit should be parent of commits being checked in"
When I use "git-tfs checin --remote azuretfs" all files are uploaded to the AzureDevOps project but without the history.
So can anyone describe what I have to do?
Note: I don't want to use the MigrationTool offered by Microsoft because of to many erros during validation the templates of work items etc. (we dont use it...)
For those who are looking for the same:
With the 'old' git tf tool (https://archive.codeplex.com/?p=gittf) you can migrate old TFVC project to Azure DevOps(TVFC).
If you want to migrate old TFVC projects to AzureDevOps(GIT) you should use git tfs (http://git-tfs.com/)
What you could try without guarantee of success...
Note: As I said, you will be able to migrate the history from one branch only.
Create the folder/project in TFVC where you want to put the source code.
Migrate this folder with git tfs clone (to have a git commit with the git-tfs metadata required to rcheckin)
Add the already migrated history repo (let's call it RepoWithHistory) as a local remote in this new repository (let's call it NewRepo). And git fetch
Clean metadata for only the commit coming from RepoWithHistory with something looking like: git filter-branch -f --msg-filter "sed 's/^git-tfs-id:.*$//g'" -- --all. But be careful to keep the metadata on the commits coming from NewRepo.
Use git replace --graft <sha1_of_first_commit_of_RepoWithHistory> <sha1_of_last_commit_of_NewRepo> to graft the 2 histories (the history must be on top of the one from the new one)
Use git rcheckin --no-merge to migrate the history to TFVC (that will be long...)
I hope it will help.
PS: perhaps you should try to do it on a small subset of commits to be able to verify it will works before doing it in the real TFVC project.

Is it possible to migrate code from Bitbucket to TFS 2018.3 (On premise) with history?

We are trying to migrate the code from BitBucket to TFS (on-premise) 2018.3 and we are looking for a possible way to migrate the code with history.
We searched a lot and haven't found a way or tool for this process.
Are there any tools which help to create bidirectional sync between TFS and BitBucket?
According to your description, seems you want to migrate code with git version control in bitbucket to TFVC version control.
In this case, we recommend you to try external tools like Git-TFS for importing.
git-tfs is a two-way bridge between TFS (Team Foundation Server) and git, similar to git-svn. It fetches TFS commits into a git repository, and lets you push your updates back to TFS.
Other things about the migration, you could take a look at our suggestions here: https://learn.microsoft.com/en-us/azure/devops/learn/git/migrate-from-tfvc-to-git#advanced-migrations

VSTS to TFS on-premises datas migration

I would like to migrate all possible datas from my VSTS Project to an on-premises TFS server 2015.
I dont know wich data can or cananot be migrated, the most important for me is the history of versions and the source control code.
I'we watched the internet about it but found only tutos from 2014...
I'm aware of tools like OpsHub but i want a free solution if it's possible.
If someone can help, it will be appreciated :D
Thanks all (and forgive my bad english, not my native language).
The only option is via third-party tools. There is no capability to migrate from VSTS to on-prem TFS.
For version control migration, it's fairly easy to migrate TFVC repos via git-tfs -- you have the TFVC repo converted into a Git repo, then convert the Git repo back into a TFVC repo in the target system.
If you're already using Git, it's as simple as adding a new remote to your repo and pushing it.

Using Xcode with TFS 2015 on-premises

Is there any way to check in code from Xcode to TFS 2015 on-premises installation? Even if TFS is just acting as a go between for Xcode and Git? The main thing we'd like to be able to do is for iOS code to be checked in to TFS with changesets recorded, and work items/bugs available.
Any suggestions? We are not looking to move to VS Team Services / VS Online.
you have 2 options.
The best option is to create a new TFS Team Project with Git for source control. Or you can add a Git repo so an existing Team Project. This is a standard Git repo, but hosted in TFS. It works just like any other hosted Git repo. Clone the repo and off you go.
If you cannot use Git inside TFS and you must use TFVC then you can use git-tf. This is effectively a bridge between a local git repo and a centralized TFS TFVC repo. This article should get you started
Both VSTS and TFS 2015 include full support for Git-based source control projects. You can follow MSDN article Share your code in Git using Xcode to push your project to TFS.
After pushing your project to TFS, you'll have full history and work item available:

Is possible to use multiple branch specification in TeamCity using TFS Git features?

In my project we use feature branches with TFS 2013 as source control repository and TeamCity 9.1.6 as CI server. We have plans to upgrade to TFS 2015 soon (... and cannot migrate to GIT)
I know you can use multiple branch specification when you use GIT or Mercurial... and it is pretty useful. In TFS 2013, Microsoft added native support for GIT.
I want to do multiple branch specification using my existing TFS server, in order to have a single commit build that builds every feature branch.
So my questions are:
Is there any TeamCity plugin that allow me to do that? (Easier than my possible GIT-TFS trick)
Given that TFS 2013 has GIT support, can I configure my VCS to make TeamCity build think TFS is a GIT server and use multiple branch specification as explained here?
In theory TeamCity VCS connecting to TFS as a GIT server will think it is a GT server, won't it?
No additional plugin is needed.
You can configure Git connection in TeamCity to Git repository hosted in Team Foundation Server 2013. The type of repository will be "Git" in TeamCity, so all git-related features (such as branches) will be supported.
TFS 2013 provides the option to use either TFVC or Git for your source control repository. When you create a team project, select Git from the version control options:
More information of using Git, please check:
https://www.visualstudio.com/en-us/docs/git/get-started

Resources