how to import Git project to TFS Cloud

2019-01-19 00:02发布

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条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-19 00:46

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

查看更多
登录 后发表回答