0

I'm trying import a what was a Mercurial Repository that has been imported to a GIT repository. I started this project almost a year ago that prompted the following thread: Importing Mercurial... but it got shelved I'm trying to pick back up and am where I'm trying to Import from Gitblit to TFS.

I've created a folder and cloned the TFS folder using git-tfs and then ran the "git add remote origin http://..." pointing to the local git-blt server.

When I run the "git pull origin master" command I get "fatal: Couldn't find remote ref master" I've tried "master", "default", "head" all with a similar result.

This is a very simple repository that does not have any "branches" in it. It was simply used for version control and historical reference. Is there some step I need to do to "create" a branch or something?

Community
  • 1
  • 1
dblwizard
  • 595
  • 7
  • 26
  • TFS 2013 offers git support, you do not need git-tfs. Which TFS version you use? Can you add the steps you have done? – Giulio Vian Mar 22 '17 at 20:26
  • @Giulio Vian, We are using TFS on the backend. We are importing this into another existing repository. It was my understanding that that would only work if it was going into a git repository on visualstudio.com – dblwizard Mar 23 '17 at 23:37

1 Answers1

0

Refer to these steps blow to use VS 2015 to achieve your requirement:

  1. Open VS 2015 > Team Explorer
  2. Click Manage Connections Icon > Manage Connections> Connect to team project
  3. Select or add Team foundation server (your VSTS) and select the corresponding team project >Connect
  4. Select a repository of that team project > Connect
  5. Click clone the repository link (You must clone the repository to open solutions for this project) to clone repository
  6. Click Settings >Repository Settings
  7. Click Add
  8. Type name (e.g. MyTFS) and Fetch URL (the repository URL of your TFS) >Save
  9. Go to Home view > click Sync
  10. Click Push
  11. Select a remote (step 8, MyTFS) and click Push
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • I don't have a clone option after connecting to the Project. I'm using TFVC, not Git on Visualstudio.com, does that change what I need to do? – dblwizard Jun 09 '17 at 00:11
  • @dblwizard The TFVC team project can add additional Git repositories. So, could you add a new Git repository and use it directly? (https://blogs.msdn.microsoft.com/visualstudioalm/2015/12/03/tfvc-and-git-repositories-in-the-same-team-project/) – starian chen-MSFT Jun 09 '17 at 01:37