Best practice: Subtractive merge or delete changeset?

I’ve read Plastic staff write that deleting changesets is “not a recommended practice”, and when using subtractive merge to “handle it with care”.

In working in a medium-sized studio, I find that it crops up quite often that people say “oops, I checked in stuff I didn’t mean to” or “oops, I merged from the wrong branch” or “oops, I merged but I realized I shouldn’t have yet.” Given the warnings, I’m trying to make sure I understand the best way to recommend fixing these issues.

In the cases where the new changeset is the head changeset for a branch, should they just delete the changeset? This isn’t the case where they need to delete a changeset out of the middle of a bunch of other changesets.

However, if they did add another changeset after that (often from trying to fix their error), is there any harm in deleting both? Again, assuming nothing is being merged from this branch back into a different branch. So nothing is actually depending on these changesets.

Hi, the negative part of deleting a changeset is that you will lose the tracking of what happened. If you do a subtractive merge, you can review the history and figure out that at some point there was a change that was created and then subtracted. But it’s perfectly fine if you prefer to to keep it simpler and deleting the changeset.

The only negative part is that you will lose the changeset and you may want to remove/subtract the changes created by one changeset but not the other.

Thanks for the answer. In these kinds of cases, losing the changeset and the tracking is okay, because what happened was an accident, and the changes things in an invalid state.