Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git to TFS Source Control Migration

I'd like to see how TFS will work for my command. So I'd like to move our current GIT repository to TFS database. We've used GIT for it's prevailed branching support so I'd like to use TFS 2010 to address that issue.

Now question is. How do I export our GIT repo to TFS. Obviously it's some kind of script. Does have anyone done that? Any suggestions?

Thank you.

like image 577
Artem Tikhomirov Avatar asked Dec 31 '09 00:12

Artem Tikhomirov


People also ask

Can we use Git with TFS?

Git in Visual Studio, Azure DevOps Services, and TFS is standard Git. You can use Visual Studio with third-party Git services, and you can also use third-party Git clients with TFS. To learn more, see Git and Azure Repos.

Can we use Git to clone from TFS?

Git-tfs also needs to know the path in TFS that you want to clone. It can clone any path (other than the root), so you can clone an entire TFS project, or just one subdirectory of it. Use this command to create a Git repository in local-dir. The new clone includes the full history of $/Project/Path.

Is TFVC deprecated?

TFVC has been declared feature complete. TFVC support for Eclipse and Visual Studio Code and Linux/Mac are officially deprecated/end-of-life.


1 Answers

Microsoft have now released their own GIT <--> TFS extension for GIT: GIT-TF

This allows pulling a new GIT repository from TFS or configuring to allow GIT to TFS pushes, which is what you want to do:

(from the documentation)

For a team working with an existing Git repo, a developer sharing changes to TFS using Git-TF would use the following workflow.

# Configure the existing repo's relationship with TFS
git tf configure http://myserver:8080/tfs $/TeamProjectA/Main

# Fetch the latest changes from TFS and merge those 
# changes with the local changes.
# Note, merging is important when working in a team configuration. 
# See "Rebase vs. Merge" below.
git tf pull

git commit -a -m "merge commit"

# Check in the merge commit as a single TFS changeset
git tf checkin

# Push the merge commit to the origin
git push

In addition, the preexisting open-source GIT-TFS solution can be used (from Windows only, Microsoft's solution uses Java and is cross-platform), described in an answer to Git to TFS 2008 one way migration (with history)

like image 159
Ray Hayes Avatar answered Sep 28 '22 01:09

Ray Hayes