Create new TFS branch with history

最后都变了- 提交于 2019-12-13 01:27:43

问题


I need to branch out, but I also need to keep the history so I can remove some change sets and build a new project. I tried branching in the UI and that created a new branch with only one history item indicating that this was branched from so and so.


回答1:


The newly created branch still contains all the history nested inside the new changeset. You can only view the history of the individual files, not with the folder or the branch.

You must click "view history" on a file in the new branch then click the drop down arrow on the branch creation changeset and the old history will show up.

For your situation, you can just branch with changeset instead of with the latest version. Detailed steps below:




回答2:


Assuming you are on TVFC rather than Git here. It doesn't really work like that, the branch isn't a clone of the complete source and history. It's kind of a marker to say we are now diverging the code base, there will be a shared history for the two branches.

When you branch you can choose to do it at the latest version, a label, a date or a changeset. Can you branch at the changeset that you want? And then you are free to build and edit in isolation in the new branch.

You can also get a specific version to your local workspace so you might not even need a branch if you only want to build a certain version of the code.



来源:https://stackoverflow.com/questions/36482439/create-new-tfs-branch-with-history

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