How to revert (Roll Back) a checkin in TFS 2010

前端 未结 7 1542
醉酒成梦
醉酒成梦 2020-12-04 09:43

Can anyone tell me how to revert (roll back) a checkin in TFS 2010?

7条回答
  •  星月不相逢
    2020-12-04 10:25

    You can rollback a changeset (in TFS2010) through command line doing:

    1. Open CMD or Visual Studio Command Prompt
    2. Change directory to your workspace folder. Example: cd C:\myWorkspace
    3. Run following tf command (where 123 is changeset number)
      C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" rollback /changeset:123 /recursive
    4. Go to Pending Changes window to check files marked with edit,rollback and do a Check In.

    Note: you must use tf.exe full path even in Visual Studio Command Prompt to avoid "Unable to determine the workspace" error. More info here

    Rollback reference (TFS 2010)
    https://msdn.microsoft.com/en-us/library/dd380776(v=vs.100).aspx

提交回复
热议问题