Peter
Peter

Reputation: 11920

How to enable git on existing TFS project?

Environment: Visual Studio 2017, TFS project set at visual studio online.

I am working on a community project. The source code is checked into TFS project using the free account provided by visual studio online.

I now need to enable git on this project such that others can use from other projects.

On TFS online, I see a way to create a new GIT-based project but I don't see any option to enable GIT on an existing TFS project. I remember to have used this option long time ago. Wondering where I can find this switch. Or, is there any easy way to migrate existing code to GIT. Regards.

Upvotes: 0

Views: 468

Answers (2)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30412

You can use Import repository to import the Git repository from TFVC.

  1. From the repo drop-down, select Import repository.
  2. Select TFVC from the Source type dropdown
  3. Type the path to the repository / branch / folder that you want to import to the Git repository. For example, $/0522TFVCScrum/BuildProcessTemplates
  4. If you want to migrate history from the TFVC repository, click Migrate history and select the number of days. You can migrate up to 180 days of history starting from the most recent changeset. A link to the TFVC repository is added in the commit message of the 1st changeset that is migrated to Git. This makes it easy to find older history when needed.
  5. Give a name to the new Git repository and click Import. Depending on the size of the import, your Git repository would be ready in a few minutes.

Refer to this article for details: Import repositories from TFVC to Git

enter image description here

Upvotes: 1

Daniel Mann
Daniel Mann

Reputation: 59037

Hover over the Code tab, click "Manage Repositories", then click the "New Repository" button.

Upvotes: 1

Related Questions