Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to import Git project to TFS Cloud

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.

like image 618
Dave Alperovich Avatar asked Jan 31 '13 16:01

Dave Alperovich


People also ask

Can you 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.

How do I import a repository from GitHub to Azure DevOps?

Import into a new repoSelect Repos, Files. From the repo drop-down, select Import repository. If the source repo is publicly available, just enter the clone URL of the source repository and a name for your new Git repository.


1 Answers

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

like image 147
Edward Thomson Avatar answered Oct 25 '22 23:10

Edward Thomson