1

Please consider this scenario.

My trunk has files A.txt, B.txt, C.txt, all the way to... Z.txt.

Branch has files A.txt and C.txt which I modified.

When I merge branch to trunk, the result is modified A.txt, modified C.txt and all the other unmodified files like B.txt, D.txt, etc.

However, I would like to have the trunk only contain the modified A.txt and C.txt.

How can I do that. Please let me know.

blue piranha
  • 3,706
  • 13
  • 57
  • 98

1 Answers1

0

Since TFS include both TFVC and Git as source control, not sure which one you are using.

If you are using TFVC:

When I merge branch to trunk, the result is modified A.txt, modified C.txt and all the other unmodified files like B.txt, D.txt, etc.

This is the expected and by designed behavior, we will not be able to delete any files which only exist in target branch during merge process.

You have to manually delete those files in target branch after merge process.

If you are using Git:

Please kindly review this solution: Make the current Git branch a master branch & How to replace master branch in Git, entirely, from another branch?

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62