TFS – Forgot to untick the Preserve pending changes locally checkbox when shelving

Coming from using Git, I am used to using a stash in this scenario:

Working on a piece of functionality
High priority change comes in on the branch I’m working on that would affect the above work

In this instance, I would tend to stash my changes.

After googling, I discovered the TFS equivalent is Shelving.

So, I shelved my changes, and was horrified to see them still in existence in my source tree…
I’d forgotten to untick the “Preserve pending changes locally” checkbox:

Preserve pending changes locally checkbox

So from here, I have two options:

One

Shelve the changes again, making sure I untick “Preserve pending changes locally”
Delete the previous shelveset

Two

Simply undo pending changes on the files included in the first shelveset.

Leave a Reply

Your email address will not be published. Required fields are marked *