The Context
- We have a git repository with a release branch.
- We have a TFS repo (currently empty).
My task is to mirror the release branch of the git repo into TFS so that every commit in git maps to a changeset in TFS. All the developers only commit to git and (lets assume) are unaware of TFS.
Reading the documentation for rcheckin and the answer to this related issue makes me believe that rcheckin is capable of doing that.
The Problem
All the commits in git are squashed into a single changeset.
Reproduction sequence:
git tfs clone http://tfs:8080 $/tfsrepo
cd tfsrepo
git remote add github [email protected]:REPO/Repo.git
git fetch github
git merge github/release
git tfs rcheckin
This results in a single checkin into TFS that contains all the commits.
Other attempts at solving the problem
After clone, merge the first commit from the source (git) repo, rcheckin to create a shared base
- This worked, but subsequent
git pull github release
followed bygit-tfs rcheckin
led to commit squashing again.
- This worked, but subsequent
For the first few commits in the origin repo, I merged them one-by-one into the git-tfs shared repo and rcheckin'd after each.
- This kind of worked, as for every commit, there was one changeset in TFS. However, the original commit message second underneath a "merged c02436de4f.." message.
- It is not realistic to do for every changeset, even with scripting.
- As pointed out by patthoyts, this would make me the commiter for that change as far as TFS is concerned.
My question
What do I have to do to keep TFS up-to-date with the release branch from the git-repo so that every commit in git has a corresponding TFS changeset?
Additional info
I do have administrative control of both repos, and I would be able to rebase the git repo if necessary, with all the consequences this implies. I just don't want to lose the history we already created.