TFS Rollback vs “Get This Version”

ぐ巨炮叔叔 提交于 2020-08-24 06:57:26

问题


What is the difference between Rollback and "Get This Version" ?

Both of them let me go back to a specific version and from there doing changes and check-in.

What are the additional benefits of having both of them?


回答1:


Get specific version/Get this version

Only effects your local workspace, it reverts all your local changes to an older version. When you try to check these changes in, you'll get a merge conflict and will need to resolve these issues. It's useful when you need to debug an older version of your application for example. Checking in and forcing the local version on merge will not delete any files that were added and can cause quite a bit of mayhem. Plus, it's unclear what you've done, as all the changes will just show up as edit or add. Get specific version also doesn't revert any merge tickets, thus later merges can result in unexpected behaviors.

Rollback

Creates a compensating checkin for the selected changes. It will rollback only the changes in the selected changesets (and can roll back an arbitrary changeset in the history). It appends this change as a new changeset with the special "rollback" type. So it's clear from the history that you went back and reverted some previous changes. A rollback will correctly compensate an add by deleting the file and a delete by adding it back in. When rolling back a merge, the merge tickets also get reverted, ensuring that these changes are reevaluated when you try to merge branches later.



来源:https://stackoverflow.com/questions/42607513/tfs-rollback-vs-get-this-version

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