How do I check-in my rolled back changeset+fixes t

2019-02-26 08:27发布

问题:

  1. we committed some code by accident to TFS using VS2013 which created let's say changeset 2.
  2. In order to fix this mistake we did a rollback of changeset 2 to the local machine
  3. We then committed the rollback of changeset 2 thus creating changeset 3
  4. Now we wanted to get the code we originally mistakenly checked in (from step 1) on the local machine so we did "Get Specific Version" and selected changeset 2 so we have changeset 2 on the local machine
  5. we made the changes we wanted on the local machine which now has changeset 2

What are the steps to commit changeset 2 with the corrections back to TFS so we can create changeset 4? (the files are no longer marked as changed)

回答1:

There are 2 options.

The first is to rollback the rollback. This has the downside of marking all the files as Rolled-Back.

The second is to do the "Get Specific Version" for C2, copy the files that are changed out of source control. Perform a "Get Latest" and copy them back in. This could be a pain if this is a large changeset.