how to import Git project to TFS Cloud

与世无争的帅哥 提交于 2019-12-17 19:39:26

问题


I visited our Team Foundation Service page and found a great new feature:

New Team Project + Git

This is great news. We have Projects in Team Foundation Service AND Git. Not as much because I love Git. I was very impressed with it's functionality, but never comfortable with its interface. That said, Git is an accepted standard for Open Source and I love the idea of being able to admin my Git Repos through TFS. Getting the best of both worlds (I hope).

I was able to create a Test Project in Git and am excited.

Problem: for all the site searching, googling, poking, prodding, I can't figure out how to import an existing Git Project into TFS.


回答1:


tl;dr: Set your remote and push.

  1. Make sure you enable alternate credentials in Team Foundation Service.

  2. Set your remote: git remote add <name> <url>,
    e.g. git remote add origin https://yourname.visualstudio.com/DefaultCollection/_git/ProjectName

  3. Push it: git push <remote name> <name of branch>,
    e.g. git push origin branchname



来源:https://stackoverflow.com/questions/14630161/how-to-import-git-project-to-tfs-cloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!