0

We are moving from TFVC to GIT and managed to import the history of our branches, the problem is that the link between the two branches were lost during migration.

How the branches look Our current branches

If you look at the image above, the pink line was imported as the master branch and the blue was imported as the dev branch. In TFVC the dev branch was created from master, so instead of the blue line starting from the void it should be a new branch from the master.

Is there anyway to "link" them to reflect how they were created on TFVC?

  • 1
    Use https://stackoverflow.com/a/3811028/2303202 to place the blue branch on top of some master commit (whichever you find to be the best for this) – max630 Jul 28 '17 at 09:43

1 Answers1

0

You can use git rebase to "link" the branches, just as commented by max630, place the blue branch on top of any master commit which you want.

Try below commands:

git checkout -b temp <commit on red>

git rebase temp blue

git push -f blue

You can also reference this thread : Can I safely rebase one branch into other and then to master?

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55