0

I'm moving an old TFS repository to git. To do it I took a certain state of TFS repository, let's call it version 3, and committed it as an initial commit to git. It worked fine and I continued working in git adding some more commits to the history.

Now it appears that very old versions in TFS which I considered unimportant also need to be in git history. But I've already made git commits on top of version 3 which I would like to keep + created some working branches.

So I need to take TFS version 1, commit it as an initial state, overwrite local files with TFS version 2, commit. All this happens to a single master branch. And then I would like to make a repository with versions 1 and 2 as a history of master and place there v3 and the next commits done from the repository I initially created, so that the whole history is preserved.

Basically, I need to "insert" several commits to master in the past.

Is it possible?

(I understand that I can move changes manually step by step, but that what I would like to avoid).

ElDog
  • 1,230
  • 1
  • 10
  • 21
  • This question... or something very similar was asked a few days ago.... let me see if I can find it quick – eftshift0 Sep 28 '22 at 12:34
  • 1
    Not the one I was looking for but will probably help you: https://stackoverflow.com/questions/47928855/how-do-i-combine-several-git-repositories-without-breaking-file-history – eftshift0 Sep 28 '22 at 12:41
  • @eftshift0, It helped, thanks! I you write it as an answer, I mark it (in case you need some extra carma :-) ) – ElDog Sep 28 '22 at 14:33
  • 1
    That's the thing.... this question is rather a duplicate. Let me close it as such then. All good! – eftshift0 Sep 28 '22 at 14:39

0 Answers0