git-tfs local Git repo to TFVC

I'm testing out git-tfs with an on-premises TFS instance (does it work with VSO, too?) and trying to use rcheckin to push my Git commits up to TFVC. However, when I try and use rcheckin, I get an error that no TFS parents are found. The TFVC repo I'm pushing to is empty, and I want to push my changes from Git to TFVC. Here's what I've done:

C:\git add remote tfs http://localhost:8080/tfs/DefaultCollection/TeamProject
C:\git tfs rcheckin -master
Working with tfs remote: default
No TFS parents found!

What am I missing? Do I run this command for my other branches (like feature1, feature2, etc.)? I'm pretty new to Git-TFS, but it seems like a very handy tool.

Answers


Disclaimer : I'm one of the developer of git-tfs...

does it work with VSO, too?

Yes!

What am I missing?

Before being able to work with git-tfs (and use the rcheckin command), you MUST clone your tfs repository.

Feel free to read the other docs, too. The use of rcheckin is a good idea ;-)

How do I use an existing Git repo (separate) to push changes to the TFS repo? I've cloned the TFS repo, and it looks like it goes into a separate folder with it's own .git folder

Git-tfs is not intended to do that. But a (difficult!) solution exists using rebase.

  1. Add your existing repo as remote in the new repo cloned from TFS and fetch
  2. Use git rebase --into to rebase your old existing commits into the one fetched from tfs
  3. Use rcheckin to push the commits
  4. Do that again and again if you have branches (with more subtilities. I hope you have not!!!)

edit: I have written a shell script to replace the first 2 steps and make it easier and quicker.


Need Your Help

Ensure action being called using ssl?

c# asp.net-mvc

With c# mvc, how do I ensure that a specific Action is being invoked over ssl?

D3: Directional graph similar to tree layout but with back links

javascript layout graph d3.js

I am looking for layout in d3 which allow to layout nodes in directional graph as shown in Collapsible Tree example but the twist is that the directional graphs which I need to plot has converging ...