Git -tfs local Git repo for TFVC
I am testing git -tfs using a local TFS instance (does it work with VSO too?) And trying to use rcheckin
to get my my Git to switch to TFVC. However, when I try to use rcheckin
, I get the error that no TFS parents were found. The TFVC repo I am pushing to is empty and I want to push my changes from Git to TFVC. Here's what I did:
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? Am I running this command for my other branches (like feature1, feature2, etc.)? I'm new to git-TFS, but it seems like a very handy tool.
source to share
Disclaimer: I am the developer of git-tfs ...
does it work with VSO too?
Yes!
What am I missing?
Before working with git -tfs (and using the command rcheckin
) you MUST clone your tfs repository.
Feel free to read other documents as well. Using rcheckin is a good idea ;-)
How can I use an existing Git repository (separate) to modify changes in the TFS repository? I have cloned the TFS repository and it looks like it comes in a separate folder with its own .git folder
Git -tfs is not meant to do this. But there is a (difficult!) Solution using rebase
.
- Add existing repo as remote in new repo cloned from TFS and fetch
- Use
git rebase --into
to reinstall old existing commits into a file obtained from tfs - Use
rcheckin
to push commits - Do this over and over again if you have branches (with a lot of utilities. Hope you didn't !!!)
edit: I've written a shell script to replace the first 2 steps and make it easier and faster.
source to share