J.Merrill
J.Merrill

Reputation: 1253

Is it possible to add files to a checked-in TFS changeset?

I checked in a changeset without all the files actually involved in those changes. (The code checked in compiles, but the ones I missed are "logically connected" -- the checked-in code defines a new interface and a file I missed is one that now implements that interface.)

This was the latest changeset. I have not found any way to add the files; all I can do is check in another changeset with the extra files.

There seems to be no way to add more files when looking at a changeset.

In Git, I could "amend last commit" (or even use the "modify history" mechanisms) but this does not seem possible in TFS.

Is this just another reason to be happier using Git?

Upvotes: 6

Views: 3963

Answers (3)

MarkInEugene
MarkInEugene

Reputation: 89

There is a way to combine all your scripts into a new changeset. Here's what you do...

GIVEN:

CS1 = Your original checked in TFS changeset missing a script.

CS2 = A changeset of the rollback of CS1 in TFS

CS3 = Your new TFS changset including the missing script.

STEPS:

1) Rollback CS1

2) Now check in the rollback of CS1...this creates CS2 in TFS

3) Now GetLatest on your project to bring your workspace in sync with TFS

4) Rollback CS2

5) Add the missing script to the other scripts displayed under Pending Changes

6) Check in the complete set of scripts to create CS3

Voi'la

Upvotes: 1

Lukkha Coder
Lukkha Coder

Reputation: 4460

No. You cannot do what you want to do. A changeset is a permanent part of the history of your version-controlled items and cannot be undone or removed. You can modify the changeset, but it is restricted to the checkin comment and associated work items.

Upvotes: 2

It is not possible to add files to a ChangeSet in TFS.

Upvotes: 0

Related Questions