Willy
Willy

Reputation: 10650

How can I undo a roll back in TFS?

Here is my scenario:

I did a merge from branch-A (source) to branch-B (target). That merge carried out pending changes in branch-B that I had to check-in (e.g. changeset 1000). Then I built and published branch-B in Test environment in order to test it and I realized something was going wrong. I thought the culprit was being the merge so I decided to roll back the previous merge (changeset 1000). This roll back carried out pending changes that I had to check-in them again (changeset 1001) into branch-B. Now after investigating a lot I have discovered that the merge (changeset 1000) was not the culprit so now I want to undo the roll back of the merge (changeset 1001) and return to changeset 1000. Below and example.

branch-B history:

How can I undo changeset 1001 and return to changeset 1000, I mean, restore branch to changeset 1000? By reverting to changeset 1000 and then check pending changes in again?

Upvotes: 1

Views: 2177

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51183

Some information about rollback in TFS, please kindly refer below:

  • If your change is still pending (you have not yet checked it in), you can undo the change instead of rolling it back. See Develop code and manage pending changes.
  • Like most changes you make to files, a rollback change is queued as a pending change. After you roll back the files, you can view the files you are changing and compare the content of the files with the latest version on the server. After you confirm the actual changes match
    what you intend to do, you can then check them in.
  • Rollback does not delete changesets or any data. If you change your mind, use rollback to revert the content of the files back to their state before the rollback.

Hope this helps.

Upvotes: 1

Related Questions