How do I delete a folder in a branch of TFS, but not in the main part?

耗尽温柔 提交于 2019-12-11 12:17:53

问题


We need to delete a folder in one of our branches, but do not want it deleted in the main/root repository. The deleted folder is gone in ONE older version, but the newer versions retain it, as do the older versions.

I deleted it in the branch, merged to main, then in main did "undo pending changes" on that folder. The problem is each new merge to main, it wants to delete that folder again. How do I tell it to leave it in the main/root?


回答1:


To prevent a changeset from being merged, you need to discard it. This is done from the Command Prompt.

The following example discards changeset 137 as a candidate for merging into branch2.

tf merge /discard /version:C137 branch1 branch2 /recursive


来源:https://stackoverflow.com/questions/22492319/how-do-i-delete-a-folder-in-a-branch-of-tfs-but-not-in-the-main-part

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!