Git to TFS Source Control Migration

前端 未结 5 1373
粉色の甜心
粉色の甜心 2021-02-04 06:08

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

5条回答
  •  野性不改
    2021-02-04 06:28

    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)

提交回复
热议问题